forked from sh-edraft.de/sh_discord_bot
Removed themeService from templates #70
This commit is contained in:
@@ -28,10 +28,13 @@ export class AuthGuard implements CanActivate {
|
||||
|
||||
const role = route.data['role'];
|
||||
if (role) {
|
||||
if (!await this.authService.hasUserPermission(role)) {
|
||||
this.router.navigate(['/dashboard']);
|
||||
return false;
|
||||
}
|
||||
this.authService.hasUserPermission(role).then(hasPermission => {
|
||||
if (!hasPermission) {
|
||||
this.router.navigate(['/dashboard']);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user