diff --git a/apps/client/src/app/components/header/header.component.ts b/apps/client/src/app/components/header/header.component.ts index 29f1251e2..b74c7061a 100644 --- a/apps/client/src/app/components/header/header.component.ts +++ b/apps/client/src/app/components/header/header.component.ts @@ -49,22 +49,20 @@ export class HeaderComponent implements OnChanges { } public ngOnChanges() { - if (this.user) { - this.hasPermissionForSocialLogin = hasPermission( - this.info?.globalPermissions, - permissions.enableSocialLogin - ); + this.hasPermissionForSocialLogin = hasPermission( + this.info?.globalPermissions, + permissions.enableSocialLogin + ); - this.hasPermissionForSubscription = hasPermission( - this.info?.globalPermissions, - permissions.enableSubscription - ); + this.hasPermissionForSubscription = hasPermission( + this.info?.globalPermissions, + permissions.enableSubscription + ); - this.hasPermissionToAccessAdminControl = hasPermission( - this.user.permissions, - permissions.accessAdminControl - ); - } + this.hasPermissionToAccessAdminControl = hasPermission( + this.user?.permissions, + permissions.accessAdminControl + ); } public impersonateAccount(aId: string) {