Bugfix: 2FA enforcement #349

This commit is contained in:
the-djmaze 2022-05-20 12:36:30 +02:00
parent 01fe226a92
commit 656c5f2a3e
2 changed files with 13 additions and 8 deletions

View file

@ -106,7 +106,12 @@ class TwoFactorAuthSettings
}
testTwoFactor() {
TwoFactorAuthTestPopupView.showModal([this.twoFactorTested]);
TwoFactorAuthTestPopupView.showModal([
() => {
this.twoFactorTested(true);
this.viewEnable(true);
}
]);
}
clearTwoFactor() {
@ -188,15 +193,15 @@ class TwoFactorAuthTestPopupView extends rl.pluginPopupView {
Remote.verifyCode(iError => {
this.testing(false);
this.codeStatus(!iError);
this.twoFactorTested(!iError);
iError || (this.onSuccess() | this.close());
}, this.code());
}
onShow(twoFactorTested) {
onShow(onSuccess) {
this.code('');
this.codeStatus(null);
this.testing(false);
this.twoFactorTested = twoFactorTested;
this.onSuccess = onSuccess;
}
}