diff --git a/src/app/guards/authenticated-no-delagator.guard.ts b/src/app/guards/authenticated-no-delagator.guard.ts index 5fc59f6c6e..2fc39afaac 100644 --- a/src/app/guards/authenticated-no-delagator.guard.ts +++ b/src/app/guards/authenticated-no-delagator.guard.ts @@ -30,17 +30,14 @@ export class AuthenticatedNoDelegatorGuard { | boolean | UrlTree { return combineLatest([ - this._togglz.getStateOf('RESTRICTED_DELEGATORS'), this._userInfo.getUserSession(), ]).pipe( map((value) => { - const restrictedDelegators = value[0] - const userSession = value[1] + const userSession = value[0] if ( (userSession.loggedIn && userSession.userInfo.IN_DELEGATION_MODE === 'false') || - userSession.userInfo.DELEGATED_BY_ADMIN === 'true' || - !restrictedDelegators + userSession.userInfo.DELEGATED_BY_ADMIN === 'true' ) { return true } else { diff --git a/src/app/layout/user-menu/user-menu.component.html b/src/app/layout/user-menu/user-menu.component.html index c280aa2bb6..1d3b072a50 100644 --- a/src/app/layout/user-menu/user-menu.component.html +++ b/src/app/layout/user-menu/user-menu.component.html @@ -61,8 +61,7 @@ *ngIf=" userInfo && (userInfo['IN_DELEGATION_MODE'] === 'false' || - userInfo['DELEGATED_BY_ADMIN'] === 'true' || - !restrictedDelegators) + userInfo['DELEGATED_BY_ADMIN'] === 'true') " > settings diff --git a/src/app/layout/user-menu/user-menu.component.ts b/src/app/layout/user-menu/user-menu.component.ts index 2d5ebd49e0..b8ed8bfce3 100644 --- a/src/app/layout/user-menu/user-menu.component.ts +++ b/src/app/layout/user-menu/user-menu.component.ts @@ -26,7 +26,6 @@ export class UserMenuComponent implements OnInit { labelSigninRegister = $localize`:@@layout.ariaLabelSigninRegister:Sign in to ORCID or register for your ORCID iD` labelUserMenu = $localize`:@@layout.ariaLabelUserMenu:User menu` isAccountDelegate: boolean - restrictedDelegators: boolean inboxUnread = 0 constructor( @@ -53,10 +52,7 @@ export class UserMenuComponent implements OnInit { }) } - ngOnInit() { - this._togglz - .getStateOf('RESTRICTED_DELEGATORS') - .subscribe((value) => (this.restrictedDelegators = value)) + ngOnInit() { this._inboxService .retrieveUnreadCount() .pipe(first())