diff --git a/CHANGELOG.md b/CHANGELOG.md index 5053e9c571..0afa15ee1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ way to update this template, but currently, we follow a pattern: - [add] Show a banner when a user is logged in with limited access. [#1259](https://github.com/sharetribe/ftw-daily/pull/1259) + [#1261](https://github.com/sharetribe/ftw-daily/pull/1261) - [add] Support for logging in as a user from Console. [#1254](https://github.com/sharetribe/ftw-daily/pull/1254) - [change] Add `handlebars` 4.5.3 and `serialize-javascript` 2.1.1 to resolutions in `package.json`. diff --git a/server/apiRouter.js b/server/apiRouter.js index 9e668c6fb2..8e3c6d5711 100644 --- a/server/apiRouter.js +++ b/server/apiRouter.js @@ -3,7 +3,7 @@ * tasks that can not be handled in the browser. * * The endpoints should not clash with the application routes. Therefore, the - * enpoints are prefixed in the main server where this file is used. + * endpoints are prefixed in the main server where this file is used. */ const http = require('http'); @@ -23,8 +23,8 @@ const USING_SSL = process.env.REACT_APP_SHARETRIBE_USING_SSL === 'true'; const router = express.Router(); -// redirect_uri param used when initiating a login as authenitcation flow and -// when requesting a token useing an authorization code +// redirect_uri param used when initiating a login as authentication flow and +// when requesting a token using an authorization code const loginAsRedirectUri = `${ROOT_URL.replace(/\/$/, '')}/api/login-as`; // Instantiate HTTP(S) Agents with keepAlive set to true. @@ -50,14 +50,14 @@ const urlifyBase64 = base64Str => // Initiates an authorization code authentication flow. This authentication flow // enables marketplace operators that have an ongoing Console session to log -// into their marketplace as a user of the marketpalce. +// into their marketplace as a user of the marketplace. // -// The authroization code is requested from Console and it is used to request a +// The authorization code is requested from Console and it is used to request a // token from the Flex Auth API. // // This endpoint will return a 302 to Console which requests the authorization // code. Console returns a 302 with the code to the `redirect_uri` that is -// passed in this reponse. The request to the redirect URI is handled with the +// passed in this response. The request to the redirect URI is handled with the // `/login-as` endpoint. router.get('/initiate-login-as', (req, res) => { const userId = req.query.user_id; diff --git a/src/components/LimitedAccessBanner/LimitedAccessBanner.js b/src/components/LimitedAccessBanner/LimitedAccessBanner.js index 8057cf1b22..51c73ea193 100644 --- a/src/components/LimitedAccessBanner/LimitedAccessBanner.js +++ b/src/components/LimitedAccessBanner/LimitedAccessBanner.js @@ -27,6 +27,7 @@ const LimitedAccessBanner = props => { const showBanner = user.id && isAuthenticated && + authScopes && authScopes.length === 1 && authScopes[0] === 'user:limited' && !disabledPages.includes(currentPage);