mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
Merge branch '3030-feature-role-administration-backend' of
github.com:gradido/gradido into 3030-feature-role-administration-backend
This commit is contained in:
commit
03f60fa4d4
@ -39,7 +39,7 @@ export const isAuthorized: AuthChecker<Context> = async ({ context }, rights) =>
|
||||
})
|
||||
context.user = user
|
||||
context.role = ROLE_USER
|
||||
if (user.userRoles && user.userRoles.length > 0) {
|
||||
if (user.userRoles?.length > 0) {
|
||||
switch (user.userRoles[0].role) {
|
||||
case RoleNames.ROLE_NAME_ADMIN:
|
||||
context.role = ROLE_ADMIN
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user