|
|
@ -76,8 +76,8 @@ export class GfUserAccountSettingsComponent implements OnInit { |
|
|
public deleteOwnUserForm = this.formBuilder.group({ |
|
|
public deleteOwnUserForm = this.formBuilder.group({ |
|
|
accessToken: ['', Validators.required] |
|
|
accessToken: ['', Validators.required] |
|
|
}); |
|
|
}); |
|
|
public hasPermissionForSubscription: boolean; |
|
|
|
|
|
public hasPermissionToDeleteOwnUser: boolean; |
|
|
public hasPermissionToDeleteOwnUser: boolean; |
|
|
|
|
|
public hasPermissionToRequestOwnUserDeletion: boolean; |
|
|
public hasPermissionToUpdateViewMode: boolean; |
|
|
public hasPermissionToUpdateViewMode: boolean; |
|
|
public hasPermissionToUpdateUserSettings: boolean; |
|
|
public hasPermissionToUpdateUserSettings: boolean; |
|
|
public isAccessTokenHidden = true; |
|
|
public isAccessTokenHidden = true; |
|
|
@ -115,17 +115,11 @@ export class GfUserAccountSettingsComponent implements OnInit { |
|
|
private userService: UserService, |
|
|
private userService: UserService, |
|
|
public webAuthnService: WebAuthnService |
|
|
public webAuthnService: WebAuthnService |
|
|
) { |
|
|
) { |
|
|
const { baseCurrency, currencies, globalPermissions } = |
|
|
const { baseCurrency, currencies } = this.dataService.fetchInfo(); |
|
|
this.dataService.fetchInfo(); |
|
|
|
|
|
|
|
|
|
|
|
this.baseCurrency = baseCurrency; |
|
|
this.baseCurrency = baseCurrency; |
|
|
this.currencies = currencies; |
|
|
this.currencies = currencies; |
|
|
|
|
|
|
|
|
this.hasPermissionForSubscription = hasPermission( |
|
|
|
|
|
globalPermissions, |
|
|
|
|
|
permissions.enableSubscription |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
this.userService.stateChanged |
|
|
this.userService.stateChanged |
|
|
.pipe(takeUntilDestroyed(this.destroyRef)) |
|
|
.pipe(takeUntilDestroyed(this.destroyRef)) |
|
|
.subscribe((state) => { |
|
|
.subscribe((state) => { |
|
|
@ -139,6 +133,11 @@ export class GfUserAccountSettingsComponent implements OnInit { |
|
|
permissions.deleteOwnUser |
|
|
permissions.deleteOwnUser |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
this.hasPermissionToRequestOwnUserDeletion = hasPermission( |
|
|
|
|
|
this.user.permissions, |
|
|
|
|
|
permissions.requestOwnUserDeletion |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
this.hasPermissionToUpdateUserSettings = hasPermission( |
|
|
this.hasPermissionToUpdateUserSettings = hasPermission( |
|
|
this.user.permissions, |
|
|
this.user.permissions, |
|
|
permissions.updateUserSettings |
|
|
permissions.updateUserSettings |
|
|
|