mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 04:29:21 +03:00
Drop 2FA, read #84
This commit is contained in:
parent
ca59c21602
commit
48fa1a1fdc
44 changed files with 119 additions and 1461 deletions
|
|
@ -16,10 +16,6 @@ export class SecurityAdminSettings {
|
|||
verifySslCertificate: !!SettingsGet('VerifySslCertificate'),
|
||||
allowSelfSigned: !!SettingsGet('AllowSelfSigned'),
|
||||
|
||||
isTwoFactorDropperShown: false,
|
||||
twoFactorDropperUser: '',
|
||||
twoFactorDropperUserFocused: false,
|
||||
|
||||
adminLogin: SettingsGet('AdminLogin'),
|
||||
adminLoginError: false,
|
||||
adminPassword: '',
|
||||
|
|
@ -30,9 +26,7 @@ export class SecurityAdminSettings {
|
|||
adminPasswordUpdateError: false,
|
||||
adminPasswordUpdateSuccess: false,
|
||||
|
||||
capaOpenPGP: Settings.capa(Capa.OpenPGP),
|
||||
capaTwoFactorAuth: Settings.capa(Capa.TwoFactor),
|
||||
capaTwoFactorAuthForce: Settings.capa(Capa.TwoFactorForce)
|
||||
capaOpenPGP: Settings.capa(Capa.OpenPGP)
|
||||
});
|
||||
|
||||
addSubscribablesTo(this, {
|
||||
|
|
@ -60,18 +54,6 @@ export class SecurityAdminSettings {
|
|||
CapaOpenPGP: value ? 1 : 0
|
||||
}),
|
||||
|
||||
capaTwoFactorAuth: value => {
|
||||
value || this.capaTwoFactorAuthForce(false);
|
||||
Remote.saveAdminConfig(null, {
|
||||
CapaTwoFactorAuth: value ? 1 : 0
|
||||
});
|
||||
},
|
||||
|
||||
capaTwoFactorAuthForce: value =>
|
||||
Remote.saveAdminConfig(null, {
|
||||
CapaTwoFactorAuthForce: value ? 1 : 0
|
||||
}),
|
||||
|
||||
useLocalProxyForExternalImages: value =>
|
||||
Remote.saveAdminConfig(null, {
|
||||
UseLocalProxyForExternalImages: value ? 1 : 0
|
||||
|
|
@ -120,15 +102,6 @@ export class SecurityAdminSettings {
|
|||
return true;
|
||||
}
|
||||
|
||||
showTwoFactorDropper() {
|
||||
this.twoFactorDropperUser('');
|
||||
this.isTwoFactorDropperShown(true);
|
||||
|
||||
setTimeout(() => {
|
||||
this.twoFactorDropperUserFocused(true);
|
||||
}, 50);
|
||||
}
|
||||
|
||||
onNewAdminPasswordResponse(iError, data) {
|
||||
if (iError) {
|
||||
this.adminPasswordUpdateError(true);
|
||||
|
|
@ -147,9 +120,5 @@ export class SecurityAdminSettings {
|
|||
this.adminPassword('');
|
||||
this.adminPasswordNew('');
|
||||
this.adminPasswordNew2('');
|
||||
|
||||
this.isTwoFactorDropperShown(false);
|
||||
this.twoFactorDropperUser('');
|
||||
this.twoFactorDropperUserFocused(false);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,12 +11,9 @@ import { SettingsUserStore } from 'Stores/User/Settings';
|
|||
|
||||
import Remote from 'Remote/User/Fetch';
|
||||
|
||||
import { TwoFactorConfigurationPopupView } from 'View/Popup/TwoFactorConfiguration';
|
||||
|
||||
export class SecurityUserSettings {
|
||||
constructor() {
|
||||
this.capaAutoLogout = Settings.capa(Capa.AutoLogout);
|
||||
this.capaTwoFactor = Settings.capa(Capa.TwoFactor);
|
||||
|
||||
this.autoLogout = SettingsUserStore.autoLogout;
|
||||
this.autoLogoutTrigger = ko.observable(SaveSettingsStep.Idle);
|
||||
|
|
@ -43,8 +40,4 @@ export class SecurityUserSettings {
|
|||
));
|
||||
}
|
||||
}
|
||||
|
||||
configureTwoFactor() {
|
||||
showScreenPopup(TwoFactorConfigurationPopupView);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue