From 4cd39cafc3f4d14ff9906fd1058ce51ec2b3a680 Mon Sep 17 00:00:00 2001 From: f-necas <39771412+f-necas@users.noreply.github.com> Date: Thu, 15 Feb 2024 13:40:51 +0100 Subject: [PATCH] Viewer to reviewer --- src/auth.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/auth.ts b/src/auth.ts index 52e46be..7327734 100644 --- a/src/auth.ts +++ b/src/auth.ts @@ -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' @@ -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