Updated to angular 11
Now compiling with strict mode in typescript Need to error checking now
This commit is contained in:
@ -24,7 +24,7 @@ export class AuthGuard implements CanActivate {
|
||||
this.router.navigate(['/login'], { queryParams: { returnUrl: state.url } });
|
||||
return false;
|
||||
}
|
||||
if (permission !== undefined && user.perms.indexOf(permission) === -1) {
|
||||
if (permission !== undefined && !this.authService.allowed(permission)) {
|
||||
this.toaster.show('Danger', 'You do not have the permission to access this area.');
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user