Added "Enforce 2-Step verification" setting

This commit is contained in:
RainLoop Team 2015-04-07 20:39:43 +04:00
parent b7709c8117
commit acb013fbb5
47 changed files with 1271 additions and 908 deletions

View file

@ -28,11 +28,27 @@
this.weakPassword = AppAdminStore.weakPassword;
this.capaOpenPGP = CapaAdminStore.openPGP;
this.capaTwoFactorAuth = CapaAdminStore.twoFactorAuth;
this.capaTwoFactorAuthForce = CapaAdminStore.twoFactorAuthForce;
this.capaTwoFactorAuth.subscribe(function (bValue) {
if (!bValue)
{
this.capaTwoFactorAuthForce(false);
}
}, this);
this.verifySslCertificate = ko.observable(!!Settings.settingsGet('VerifySslCertificate'));
this.allowSelfSigned = ko.observable(!!Settings.settingsGet('AllowSelfSigned'));
this.verifySslCertificate.subscribe(function (bValue) {
if (!bValue)
{
this.allowSelfSigned(true);
}
}, this);
this.adminLogin = ko.observable(Settings.settingsGet('AdminLogin'));
this.adminLoginError = ko.observable(false);
this.adminPassword = ko.observable('');
@ -126,6 +142,12 @@
});
});
this.capaTwoFactorAuthForce.subscribe(function (bValue) {
Remote.saveAdminConfig(Utils.emptyFunction, {
'CapaTwoFactorAuthForce': bValue ? '1' : '0'
});
});
this.useLocalProxyForExternalImages.subscribe(function (bValue) {
Remote.saveAdminConfig(null, {
'UseLocalProxyForExternalImages': bValue ? '1' : '0'