diff --git a/src/common/util/roles.ts b/src/common/util/roles.ts index 0de876eb4..915937444 100644 --- a/src/common/util/roles.ts +++ b/src/common/util/roles.ts @@ -53,7 +53,7 @@ export const canViewSupporters = (sessionRoles: SessionRoles): boolean => { } export const isAdmin = (session: Session | JWT | null): boolean => { - if (session && session.user && session.user.resource_access && session.user.realm_access) { + if (session && session.user) { const sessionRoles: SessionRoles = { realmRoles: session.user?.realm_access.roles ?? [], resourceRoles: session.user?.resource_access?.account.roles ?? [],