|
|
@ -71,11 +71,13 @@ import { catchError } from 'rxjs/operators'; |
|
|
export class GfUserAccountSettingsComponent implements OnInit { |
|
|
export class GfUserAccountSettingsComponent implements OnInit { |
|
|
public appearancePlaceholder = $localize`Auto`; |
|
|
public appearancePlaceholder = $localize`Auto`; |
|
|
public baseCurrency: string; |
|
|
public baseCurrency: string; |
|
|
|
|
|
public closeUserAccountMail: string; |
|
|
public currencies: string[] = []; |
|
|
public currencies: string[] = []; |
|
|
public deleteOwnUserForm = this.formBuilder.group({ |
|
|
public deleteOwnUserForm = this.formBuilder.group({ |
|
|
accessToken: ['', Validators.required] |
|
|
accessToken: ['', Validators.required] |
|
|
}); |
|
|
}); |
|
|
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; |
|
|
@ -124,11 +126,18 @@ export class GfUserAccountSettingsComponent implements OnInit { |
|
|
if (state?.user) { |
|
|
if (state?.user) { |
|
|
this.user = state.user; |
|
|
this.user = state.user; |
|
|
|
|
|
|
|
|
|
|
|
this.closeUserAccountMail = `mailto:hi@ghostfol.io?subject=Delete Account&body=Hello%0D%0DPlease delete my Ghostfolio account.%0D%0DUser ID: ${this.user.id}%0D%0DKind regards`; |
|
|
|
|
|
|
|
|
this.hasPermissionToDeleteOwnUser = hasPermission( |
|
|
this.hasPermissionToDeleteOwnUser = hasPermission( |
|
|
this.user.permissions, |
|
|
this.user.permissions, |
|
|
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 |
|
|
|