fix 401 loop hell
This commit is contained in:
@@ -23,6 +23,7 @@ export class UserPortalComponent implements OnInit, OnDestroy {
|
||||
isMobile = false;
|
||||
currentUser: UserInfo | null = null;
|
||||
currentPageTitle = 'Dashboard';
|
||||
showAdminSection = false;
|
||||
unreadMessages = 3;
|
||||
unreadNotifications = 2;
|
||||
|
||||
@@ -64,6 +65,7 @@ export class UserPortalComponent implements OnInit, OnDestroy {
|
||||
.pipe(takeUntil(this.destroy$))
|
||||
.subscribe(user => {
|
||||
this.currentUser = user;
|
||||
this.showAdminSection = !!user?.roles?.includes('super_admin');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -76,6 +78,8 @@ export class UserPortalComponent implements OnInit, OnDestroy {
|
||||
.subscribe(() => {
|
||||
this.updatePageTitle();
|
||||
});
|
||||
|
||||
this.updatePageTitle();
|
||||
}
|
||||
|
||||
private updatePageTitle(): void {
|
||||
|
||||
Reference in New Issue
Block a user