Skip to content

Commit

Permalink
N21-2136 debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
GordonNicholasCap committed Nov 8, 2024
1 parent 230e813 commit c88fcf9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions helpers/authentication.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,12 @@ const populateCurrentUser = async (req, res) => {

try {
const response = await api(req, { version: 'v3' }).get(`/systems/public/${decodedJwt.systemId}`);
const featureFlag = Configuration.get('FEATURE_EXTERNAL_SYSTEM_LOGOUT_ENABLED');
res.locals.isExternalLogoutAllowed = Configuration.get('FEATURE_EXTERNAL_SYSTEM_LOGOUT_ENABLED')
&& response.alias === 'SANIS';
res.locals.systemName = response.displayName;
logger.info('response: ', response.alias, response.displayName);
logger.info('feature: ', featureFlag);
} catch (err) {
const metadata = { error: err.toString() };
logger.error('Unable to find out the external login system used by user', metadata);
Expand Down

0 comments on commit c88fcf9

Please sign in to comment.