diff --git a/frontend/src/app/services/auth.service.ts b/frontend/src/app/services/auth.service.ts index f88cc1c..7ab1a07 100644 --- a/frontend/src/app/services/auth.service.ts +++ b/frontend/src/app/services/auth.service.ts @@ -106,7 +106,8 @@ export class AuthService { return claims?.authorizations || []; } - public hasAccess(authorization: string[]): boolean { - return this.getUserAuthorizations().filter(entry => authorization.includes(entry)).length > 0; + public hasAccess(requiredAuthorizations: string[]): boolean { + const userAuthorizations = this.getUserAuthorizations(); + return requiredAuthorizations.some(auth => userAuthorizations.includes(auth)); } }