From 94bae0bc3867bcdcf06fecf26a3d857b8c841f88 Mon Sep 17 00:00:00 2001 From: Konstantinos Spyrou Date: Fri, 16 Jul 2021 11:47:34 +0000 Subject: [PATCH] changed roles for super admin and provide admin --- src/app/services/auth-guard.service.ts | 4 ++-- src/app/shared/sidemenu/sidemenu.component.ts | 4 ++-- .../shared/topmenudashboard/topmenu-dashboard.component.ts | 4 ++-- src/app/shared/topmenulanding/topmenu-landing.component.ts | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/app/services/auth-guard.service.ts b/src/app/services/auth-guard.service.ts index 5f1123a11..000a7fd7e 100755 --- a/src/app/services/auth-guard.service.ts +++ b/src/app/services/auth-guard.service.ts @@ -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; } diff --git a/src/app/shared/sidemenu/sidemenu.component.ts b/src/app/shared/sidemenu/sidemenu.component.ts index 1864d48b4..bc29c4b61 100644 --- a/src/app/shared/sidemenu/sidemenu.component.ts +++ b/src/app/shared/sidemenu/sidemenu.component.ts @@ -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; } diff --git a/src/app/shared/topmenudashboard/topmenu-dashboard.component.ts b/src/app/shared/topmenudashboard/topmenu-dashboard.component.ts index 9252d93e0..18a177810 100644 --- a/src/app/shared/topmenudashboard/topmenu-dashboard.component.ts +++ b/src/app/shared/topmenudashboard/topmenu-dashboard.component.ts @@ -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; } } diff --git a/src/app/shared/topmenulanding/topmenu-landing.component.ts b/src/app/shared/topmenulanding/topmenu-landing.component.ts index 28895abf1..0498994ff 100755 --- a/src/app/shared/topmenulanding/topmenu-landing.component.ts +++ b/src/app/shared/topmenulanding/topmenu-landing.component.ts @@ -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; } }