From 25acb3188d46fa47c5f081d6fc00836b3b270adf Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Wed, 30 Sep 2020 12:39:14 +0200 Subject: [PATCH] Fixing a bug with the authentification guard --- src/app/auth/misc/authenticated-guard.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/auth/misc/authenticated-guard.service.ts b/src/app/auth/misc/authenticated-guard.service.ts index 3bb01338..c9a49799 100644 --- a/src/app/auth/misc/authenticated-guard.service.ts +++ b/src/app/auth/misc/authenticated-guard.service.ts @@ -59,7 +59,7 @@ export class AuthGuard else { for (let perm of permissions) - if (!AuthGuard.defaultPermissions.includes(perm)) + if (AuthGuard.defaultPermissions?.includes(perm) === true) return false; return true; } @@ -69,4 +69,4 @@ export class AuthGuard AuthGuard.guards.push(AuthenticatedGuard); return AuthenticatedGuard; } -} \ No newline at end of file +}