mirror of
https://github.com/fabioformosa/quartz-manager.git
synced 2025-12-27 20:53:17 +09:00
#63 temporary commented the ROLE_ADMIN
This commit is contained in:
@@ -13,12 +13,14 @@ export class AdminGuard implements CanActivate {
|
||||
return true;
|
||||
}
|
||||
if (this.userService.currentUser) {
|
||||
if (JSON.stringify(this.userService.currentUser.authorities).search('ROLE_ADMIN') !== -1) {
|
||||
return true;
|
||||
} else {
|
||||
this.router.navigate(['/403']);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
// to be enable again in the scope of the card #65
|
||||
// if (JSON.stringify(this.userService.currentUser.authorities).search('ROLE_ADMIN') !== -1) {
|
||||
// return true;
|
||||
// } else {
|
||||
// this.router.navigate(['/403']);
|
||||
// return false;
|
||||
// }
|
||||
} else {
|
||||
console.log('NOT AN ADMIN ROLE');
|
||||
this.router.navigate(['/login'], {queryParams: {returnUrl: state.url}});
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<p>
|
||||
Your access doesn't allow!!
|
||||
Forbbiden - Your access doesn't allow!!
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user