71429: Abstract FeatureAuthorizationGuard + small fix

This commit is contained in:
Kristof De Langhe
2020-06-18 17:39:11 +02:00
parent bbbeddc875
commit 89afaaa4a5
6 changed files with 79 additions and 34 deletions

View File

@@ -73,7 +73,7 @@ export class AdminSidebarComponent extends MenuComponent implements OnInit {
* Set and calculate all initial values of the instance variables
*/
ngOnInit(): void {
this.authorizationService.isAuthenticated(FeatureType.AdministratorOf).pipe(take(1)).subscribe((authorized) => {
this.authorizationService.isAuthenticated(FeatureType.AdministratorOf).subscribe((authorized) => {
this.createMenu(authorized);
super.ngOnInit();
this.sidebarWidth = this.variableService.getVariable('sidebarItemsWidth');