From 1474945b1a1eacbf3ea3d5989625583b2639ebfe Mon Sep 17 00:00:00 2001 From: Thomas <4159106+dtslvr@users.noreply.github.com> Date: Sun, 22 Aug 2021 09:55:46 +0200 Subject: [PATCH] Move permissions to constructor --- .../src/app/pages/about/about-page.component.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/client/src/app/pages/about/about-page.component.ts b/apps/client/src/app/pages/about/about-page.component.ts index 4a7cb6071..8fe70607c 100644 --- a/apps/client/src/app/pages/about/about-page.component.ts +++ b/apps/client/src/app/pages/about/about-page.component.ts @@ -35,12 +35,7 @@ export class AboutPageComponent implements OnDestroy, OnInit { private changeDetectorRef: ChangeDetectorRef, private dataService: DataService, private userService: UserService - ) {} - - /** - * Initializes the controller - */ - public ngOnInit() { + ) { const { globalPermissions, statistics } = this.dataService.fetchInfo(); this.hasPermissionForBlog = hasPermission( @@ -59,7 +54,12 @@ export class AboutPageComponent implements OnDestroy, OnInit { ); this.statistics = statistics; + } + /** + * Initializes the controller + */ + public ngOnInit() { this.userService.stateChanged .pipe(takeUntil(this.unsubscribeSubject)) .subscribe((state) => {