diff --git a/src/app/authentication.guard.ts b/src/app/authentication.guard.ts index 4e4f004072101b72a224b54a4236be5b33d5202d..9009340b11f5390f31ed08fdc09378b463a2fd54 100644 --- a/src/app/authentication.guard.ts +++ b/src/app/authentication.guard.ts @@ -25,7 +25,7 @@ export class AuthenticationGuard implements CanActivate { // Allow access when user is logged in AND // the route doesn't require a specific role OR // the user's role is one of the required roles - if (user && (!requiredRoles || requiredRoles.includes(user.role))) { + if (user && (!requiredRoles || requiredRoles.includes(user.userRole))) { return true; }