changed roles for super admin and provide admin
This commit is contained in:
parent
c53d5f54b6
commit
94bae0bc38
|
@ -36,8 +36,8 @@ export class AuthGuardService implements CanActivate, CanLoad {
|
|||
canLoad () {
|
||||
|
||||
if (this.authenticationService.getUserRole() &&
|
||||
(this.authenticationService.getUserRole().includes('ROLE_ADMIN') ||
|
||||
this.authenticationService.getUserRole().includes('ROLE_PROVIDE_ADMIN')) ) {
|
||||
(this.authenticationService.getUserRole().includes('SUPER_ADMINISTRATOR') ||
|
||||
this.authenticationService.getUserRole().includes('CONTENT_PROVIDER_DASHBOARD_ADMINISTRATOR')) ) {
|
||||
console.log('Admin recognized');
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -136,8 +136,8 @@ export class SideMenuComponent implements OnInit {
|
|||
}
|
||||
|
||||
getIsUserAdmin() {
|
||||
this.isUserAdmin = (this.authService.getUserRole().includes('ROLE_ADMIN') ||
|
||||
this.authService.getUserRole().includes('ROLE_PROVIDE_ADMIN'));
|
||||
this.isUserAdmin = (this.authService.getUserRole().includes('SUPER_ADMINISTRATOR') ||
|
||||
this.authService.getUserRole().includes('CONTENT_PROVIDER_DASHBOARD_ADMINISTRATOR'));
|
||||
return this.isUserAdmin;
|
||||
}
|
||||
|
||||
|
|
|
@ -74,8 +74,8 @@ export class TopmenuDashboardComponent implements OnInit {
|
|||
}
|
||||
|
||||
getIsUserAdmin() {
|
||||
this.isUserAdmin = (this.authService.getUserRole().includes('ROLE_ADMIN') ||
|
||||
this.authService.getUserRole().includes('ROLE_PROVIDE_ADMIN'));
|
||||
this.isUserAdmin = (this.authService.getUserRole().includes('SUPER_ADMINISTRATOR') ||
|
||||
this.authService.getUserRole().includes('CONTENT_PROVIDER_DASHBOARD_ADMINISTRATOR'));
|
||||
return this.isUserAdmin;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,8 +57,8 @@ export class TopmenuLandingComponent implements OnInit {
|
|||
}
|
||||
|
||||
getIsUserAdmin() {
|
||||
this.isUserAdmin = (this.authService.getUserRole().includes('ROLE_ADMIN') ||
|
||||
this.authService.getUserRole().includes('ROLE_PROVIDE_ADMIN'));
|
||||
this.isUserAdmin = (this.authService.getUserRole().includes('SUPER_ADMINISTRATOR') ||
|
||||
this.authService.getUserRole().includes('CONTENT_PROVIDER_DASHBOARD_ADMINISTRATOR'));
|
||||
return this.isUserAdmin;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue