Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
AMcCartneyMTH authored Apr 29, 2024
1 parent 3a8a46a commit 32449b4
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 32449b4

Please sign in to comment.