access only to superadmin

access only to superadmin, admin and user will be see screen according to permission.
added logo to dashboard
mazdak/UX-2365
Mazdak Gibran 6 days ago
parent 92ebdf3490
commit 57555718d2

@ -1 +1,3 @@
<p>dashboard works!</p> <div class="dashboard-bg">
<p>dashboard works!</p>
</div>

@ -0,0 +1,14 @@
.dashboard-bg {
position: relative;
min-height: 100vh;
z-index: 1;
}
.dashboard-bg::after {
content: "";
position: absolute;
inset: 0;
background: url('/assets/images/logo.png') center / contain no-repeat;
background-size: 350px;
opacity: 0.5; /* less transparent */
z-index: -1;
}

@ -81,7 +81,7 @@ export class AuthenticationService {
isAdminUser(){ isAdminUser(){
if (this.storageService && this.storageService.getItem('user') != null) { if (this.storageService && this.storageService.getItem('user') != null) {
let cachedUser = JSON.parse(this.storageService.getItem('user') || '{}'); let cachedUser = JSON.parse(this.storageService.getItem('user') || '{}');
return cachedUser.user.role === HiddenValues.ADMIN_USER || cachedUser.user.role === HiddenValues.SUPER_ADMIN; return cachedUser.user.role === HiddenValues.SUPER_ADMIN;
} }
return false; return false;
} }

Loading…
Cancel
Save