Skip to content

Commit

Permalink
Merge pull request #462 from DFE-Digital/AMcCartneyMTH-patch-2
Browse files Browse the repository at this point in the history
Update index.js to accommodate latest Node module versions
  • Loading branch information
AMcCartneyMTH authored Apr 29, 2024
2 parents 3a8a46a + 32449b4 commit 12eaeea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/infrastructure/oidc/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ const init = async (app) => {
}

if(allUserServices && allUserServices.roles){
const { roles } = allUserServices;
const roles = allUserServices.roles.sort((a, b) => a.name.localeCompare(b.name, 'es', {sensitivity: 'base'}));
const supportClaims = {isRequestApprover: roles.some(i => i.code === 'request_approver'), isSupportUser: roles.some(i => i.code === 'support_user')};
if (!supportClaims || !supportClaims.isSupportUser) {
checkSessionAndRedirect();
Expand Down Expand Up @@ -147,4 +147,4 @@ const init = async (app) => {

module.exports = {
init,
};
};

0 comments on commit 12eaeea

Please sign in to comment.