Skip to content

Commit 451b820

Browse files
NoeSamailleGitHub Enterprise
authored andcommitted
Merge branch 'main' into solution-boms
2 parents a3a1ebd + 5390001 commit 451b820

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Ascent UI
22

3-
This repository contains the Front-End microservice of the Ascent tool.
3+
This repository contains the Front-End microservice of the Ascent tool (TechZone Deployer - Builder).
44

55
Ascent is a tool created by the IBM Ecosystem Engineering team to accelerate the adoption of IBM Software on Hybrid Cloud. Through automation and integration, Ascent enables enterprises to deliver compliant cloud architectures which can be clearly evidenced and communicated with Governance, Risk and Compliance teams.
66

server/server.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,14 +176,12 @@ const config = require('../config/config');
176176

177177

178178
app.use('/api/token', (req, res, next) => {
179-
if ( req.isAuthenticated() &&
180-
((config.authProvider === "appid" && AuthStrategy.hasScope(req, "super_edit"))
181-
|| (config.authProvider === "openshift" && req.user.groups.includes("ascent-admins"))))
179+
if ( req.isAuthenticated() )
182180
{
183181
if (config.authProvider === "openshift") {
184182
res.json({token: Buffer.from(`${req.user.token}`).toString('base64')});
185183
} else {
186-
res.json({token: Buffer.from(`${req.session[AuthStrategy.AUTH_CONTEXT].accessToken} ${req.session[AuthStrategy.AUTH_CONTEXT].identityToken}`).toString('base64')});
184+
res.json({token: Buffer.from(req.session[AuthStrategy.AUTH_CONTEXT].refreshToken).toString('base64')});
187185
}
188186
return next();
189187
} else {

src/components/ui-shell/UIShell.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ class UIShell extends Component {
189189
<strong>region:</strong>
190190
<Tag style={{ marginLeft: '.5rem' }}>{this.state.user?.region}</Tag>
191191
</li> : <></>}
192-
{ApplicationMode.isBuilderMode() && this.state.user?.role === 'admin' ? <div>
192+
{ApplicationMode.isBuilderMode() ? <div>
193193
<SwitcherDivider />
194194
<SwitcherItem aria-label="API token" onClick={this.fetchToken.bind(this)}>
195195
<span>API token</span>{this.state.copyTokenIcon}

0 commit comments

Comments
 (0)