Fixing a bug with the authentification guard

This commit is contained in:
Zoe Roux 2020-09-30 12:39:14 +02:00
parent ebf83d64ed
commit 25acb3188d

View File

@ -59,7 +59,7 @@ export class AuthGuard
else else
{ {
for (let perm of permissions) for (let perm of permissions)
if (!AuthGuard.defaultPermissions.includes(perm)) if (AuthGuard.defaultPermissions?.includes(perm) === true)
return false; return false;
return true; return true;
} }
@ -69,4 +69,4 @@ export class AuthGuard
AuthGuard.guards.push(AuthenticatedGuard); AuthGuard.guards.push(AuthenticatedGuard);
return AuthenticatedGuard; return AuthenticatedGuard;
} }
} }