changed roles for super admin and provide admin

This commit is contained in:
Konstantinos Spyrou 2021-07-16 11:47:34 +00:00
parent c53d5f54b6
commit 94bae0bc38
4 changed files with 8 additions and 8 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}
}

View File

@ -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;
}
}