[PS-1147] Added target to 2FA disable confirmation popup (#4242)

This commit is contained in:
aj-rosado 2023-04-14 16:12:48 +01:00 committed by GitHub
parent e3f31ac741
commit a09f0ed534
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 13 additions and 1 deletions

View File

@ -41,6 +41,7 @@ export class TwoFactorAuthenticatorComponent
token: string;
formPromise: Promise<TwoFactorAuthenticatorResponse>;
override componentName = "app-two-factor-authenticator";
private qrScript: HTMLScriptElement;
constructor(

View File

@ -23,6 +23,7 @@ export abstract class TwoFactorBaseComponent {
protected hashedSecret: string;
protected verificationType: VerificationType;
protected componentName = "";
constructor(
protected apiService: ApiService,
@ -53,7 +54,9 @@ export abstract class TwoFactorBaseComponent {
this.i18nService.t("disable"),
this.i18nService.t("yes"),
this.i18nService.t("no"),
"warning"
"warning",
false,
this.componentName != "" ? this.componentName + " .modal-content" : null
);
if (!confirmed) {
return;

View File

@ -23,6 +23,8 @@ export class TwoFactorDuoComponent extends TwoFactorBaseComponent {
host: string;
formPromise: Promise<TwoFactorDuoResponse>;
override componentName = "app-two-factor-duo";
constructor(
apiService: ApiService,
i18nService: I18nService,

View File

@ -26,6 +26,8 @@ export class TwoFactorEmailComponent extends TwoFactorBaseComponent {
formPromise: Promise<TwoFactorEmailResponse>;
emailPromise: Promise<unknown>;
override componentName = "app-two-factor-email";
constructor(
apiService: ApiService,
i18nService: I18nService,

View File

@ -41,6 +41,8 @@ export class TwoFactorWebAuthnComponent extends TwoFactorBaseComponent {
challengePromise: Promise<ChallengeResponse>;
formPromise: Promise<TwoFactorWebAuthnResponse>;
override componentName = "app-two-factor-webauthn";
constructor(
apiService: ApiService,
i18nService: I18nService,

View File

@ -29,6 +29,8 @@ export class TwoFactorYubiKeyComponent extends TwoFactorBaseComponent {
formPromise: Promise<TwoFactorYubiKeyResponse>;
disablePromise: Promise<unknown>;
override componentName = "app-two-factor-yubikey";
constructor(
apiService: ApiService,
i18nService: I18nService,