2-Step Verification (Google Authenticator)

Small fixes
This commit is contained in:
RainLoop Team 2014-04-05 23:48:22 +04:00
parent cae0cc2f77
commit 419b47a81e
51 changed files with 1747 additions and 419 deletions

View file

@ -7,6 +7,7 @@ function AdminSecurity()
{
this.csrfProtection = ko.observable(!!RL.settingsGet('UseTokenProtection'));
this.openPGP = ko.observable(!!RL.settingsGet('OpenPGP'));
this.allowTwoFactorAuth = ko.observable(!!RL.settingsGet('AllowTwoFactorAuth'));
this.adminLogin = ko.observable(RL.settingsGet('AdminLogin'));
this.adminPassword = ko.observable('');
@ -72,6 +73,12 @@ AdminSecurity.prototype.onBuild = function ()
'OpenPGP': bValue ? '1' : '0'
});
});
this.allowTwoFactorAuth.subscribe(function (bValue) {
RL.remote().saveAdminConfig(Utils.emptyFunction, {
'AllowTwoFactorAuth': bValue ? '1' : '0'
});
});
};
AdminSecurity.prototype.onHide = function ()