Skip to content

Commit

Permalink
Viewer to reviewer
Browse files Browse the repository at this point in the history
  • Loading branch information
f-necas authored Feb 15, 2024
1 parent 60f0b19 commit 4cd39ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type KNOWN_ROLES =
| 'ROLE_USER'
| 'ROLE_ADMINISTRATOR'
| 'ROLE_EXTRACTORAPP'
| 'ROLE_GN_VIEWER'
| 'ROLE_GN_REVIEWER'
| 'ROLE_GN_EDITOR'
| 'ROLE_GN_ADMIN'
| 'ROLE_EMAILPROXY'
Expand Down Expand Up @@ -75,7 +75,7 @@ export function getAdminRoles(roles: KNOWN_ROLES[]): AdminRoles | null {
const superUser = roles.indexOf('ROLE_SUPERUSER') > -1
const console = superUser || roles.indexOf('ROLE_ORGADMIN') > -1
const catalogAdmin = superUser || roles.indexOf('ROLE_GN_ADMIN') > -1
const catalog = !catalogAdmin && (roles.indexOf('ROLE_GN_EDITOR') > -1 || roles.indexOf('ROLE_GN_VIEWER') > -1)
const catalog = !catalogAdmin && (roles.indexOf('ROLE_GN_EDITOR') > -1 || roles.indexOf('ROLE_GN_REVIEWER') > -1)
const viewer = superUser || roles.indexOf('ROLE_MAPSTORE_ADMIN') > -1
const admin =
superUser || console || catalog || viewer || catalogAdmin
Expand Down

0 comments on commit 4cd39ca

Please sign in to comment.