Browse Source

Fix permissions in header component

pull/88/head
Thomas 4 years ago
parent
commit
d1a2c9ffb1
  1. 26
      apps/client/src/app/components/header/header.component.ts

26
apps/client/src/app/components/header/header.component.ts

@ -49,22 +49,20 @@ export class HeaderComponent implements OnChanges {
} }
public ngOnChanges() { public ngOnChanges() {
if (this.user) { this.hasPermissionForSocialLogin = hasPermission(
this.hasPermissionForSocialLogin = hasPermission( this.info?.globalPermissions,
this.info?.globalPermissions, permissions.enableSocialLogin
permissions.enableSocialLogin );
);
this.hasPermissionForSubscription = hasPermission( this.hasPermissionForSubscription = hasPermission(
this.info?.globalPermissions, this.info?.globalPermissions,
permissions.enableSubscription permissions.enableSubscription
); );
this.hasPermissionToAccessAdminControl = hasPermission( this.hasPermissionToAccessAdminControl = hasPermission(
this.user.permissions, this.user?.permissions,
permissions.accessAdminControl permissions.accessAdminControl
); );
}
} }
public impersonateAccount(aId: string) { public impersonateAccount(aId: string) {

Loading…
Cancel
Save