Browse Source

Move permissions to constructor

pull/310/head
Thomas 4 years ago
parent
commit
1474945b1a
  1. 12
      apps/client/src/app/pages/about/about-page.component.ts

12
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) => {

Loading…
Cancel
Save