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