mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 13:09:21 +03:00
Warning! Breaking change!
Removed "additional Login field" on login page (Security reason) (Closes #206) Added "custom-login-mapping" plugin
This commit is contained in:
parent
9643c621f1
commit
81e25b4235
24 changed files with 246 additions and 303 deletions
|
|
@ -7,7 +7,6 @@ function AdminLogin()
|
|||
{
|
||||
var oData = RL.data();
|
||||
|
||||
this.allowCustomLogin = oData.allowCustomLogin;
|
||||
this.determineUserLanguage = oData.determineUserLanguage;
|
||||
|
||||
this.defaultDomain = ko.observable(RL.settingsGet('LoginDefaultDomain'));
|
||||
|
|
@ -31,12 +30,6 @@ AdminLogin.prototype.onBuild = function ()
|
|||
});
|
||||
});
|
||||
|
||||
self.allowCustomLogin.subscribe(function (bValue) {
|
||||
RL.remote().saveAdminConfig(null, {
|
||||
'AllowCustomLogin': bValue ? '1' : '0'
|
||||
});
|
||||
});
|
||||
|
||||
self.allowLanguagesOnLogin.subscribe(function (bValue) {
|
||||
RL.remote().saveAdminConfig(null, {
|
||||
'AllowLanguagesOnLogin': bValue ? '1' : '0'
|
||||
|
|
|
|||
|
|
@ -775,7 +775,6 @@ Utils.initDataConstructorBySettings = function (oData)
|
|||
Globals.sAnimationType = Enums.InterfaceAnimation.Full;
|
||||
|
||||
oData.capaThemes = ko.observable(false);
|
||||
oData.allowCustomLogin = ko.observable(false);
|
||||
oData.allowLanguagesOnSettings = ko.observable(true);
|
||||
oData.allowLanguagesOnLogin = ko.observable(true);
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,6 @@ AbstractData.prototype.populateDataOnStart = function()
|
|||
this.determineUserLanguage(!!RL.settingsGet('DetermineUserLanguage'));
|
||||
|
||||
this.capaThemes(RL.capa(Enums.Capa.Themes));
|
||||
this.allowCustomLogin(!!RL.settingsGet('AllowCustomLogin'));
|
||||
this.allowLanguagesOnLogin(!!RL.settingsGet('AllowLanguagesOnLogin'));
|
||||
this.allowLanguagesOnSettings(!!RL.settingsGet('AllowLanguagesOnSettings'));
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ function WebMailDataStorage()
|
|||
;
|
||||
|
||||
this.devEmail = '';
|
||||
this.devLogin = '';
|
||||
this.devPassword = '';
|
||||
|
||||
this.accountEmail = ko.observable('');
|
||||
|
|
@ -488,7 +487,6 @@ WebMailDataStorage.prototype.populateDataOnStart = function()
|
|||
this.remoteSuggestions = !!RL.settingsGet('RemoteSuggestions');
|
||||
|
||||
this.devEmail = RL.settingsGet('DevEmail');
|
||||
this.devLogin = RL.settingsGet('DevLogin');
|
||||
this.devPassword = RL.settingsGet('DevPassword');
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,6 @@
|
|||
|
||||
textarea {
|
||||
width: 400px;
|
||||
height: 50px;
|
||||
height: 70px;
|
||||
}
|
||||
}
|
||||
|
|
@ -11,7 +11,6 @@ function LoginViewModel()
|
|||
var oData = RL.data();
|
||||
|
||||
this.email = ko.observable('');
|
||||
this.login = ko.observable('');
|
||||
this.password = ko.observable('');
|
||||
this.signMe = ko.observable(false);
|
||||
|
||||
|
|
@ -26,11 +25,9 @@ function LoginViewModel()
|
|||
this.logoCss = Utils.trim(RL.settingsGet('LoginCss'));
|
||||
|
||||
this.emailError = ko.observable(false);
|
||||
this.loginError = ko.observable(false);
|
||||
this.passwordError = ko.observable(false);
|
||||
|
||||
this.emailFocus = ko.observable(false);
|
||||
this.loginFocus = ko.observable(false);
|
||||
this.submitFocus = ko.observable(false);
|
||||
|
||||
this.email.subscribe(function () {
|
||||
|
|
@ -39,10 +36,6 @@ function LoginViewModel()
|
|||
this.additionalCode.visibility(false);
|
||||
}, this);
|
||||
|
||||
this.login.subscribe(function () {
|
||||
this.loginError(false);
|
||||
}, this);
|
||||
|
||||
this.password.subscribe(function () {
|
||||
this.passwordError(false);
|
||||
}, this);
|
||||
|
|
@ -58,7 +51,6 @@ function LoginViewModel()
|
|||
this.submitRequest = ko.observable(false);
|
||||
this.submitError = ko.observable('');
|
||||
|
||||
this.allowCustomLogin = oData.allowCustomLogin;
|
||||
this.allowLanguagesOnLogin = oData.allowLanguagesOnLogin;
|
||||
|
||||
this.langRequest = ko.observable(false);
|
||||
|
|
@ -136,7 +128,7 @@ function LoginViewModel()
|
|||
this.submitError(Utils.getNotification(Enums.Notification.UnknownError));
|
||||
}
|
||||
|
||||
}, this), this.email(), this.allowCustomLogin() ? this.login() : '', this.password(), !!this.signMe(),
|
||||
}, this), this.email(), '', this.password(), !!this.signMe(),
|
||||
this.bSendLanguage ? this.mainLanguage() : '',
|
||||
this.additionalCode.visibility() ? this.additionalCode() : '',
|
||||
this.additionalCode.visibility() ? !!this.additionalCodeSignMe() : false
|
||||
|
|
@ -181,13 +173,6 @@ function LoginViewModel()
|
|||
return !this.submitRequest() && this.twitterLoginEnabled();
|
||||
});
|
||||
|
||||
this.loginFocus.subscribe(function (bValue) {
|
||||
if (bValue && '' === this.login() && '' !== this.email())
|
||||
{
|
||||
this.login(this.email());
|
||||
}
|
||||
}, this);
|
||||
|
||||
this.socialLoginEnabled = ko.computed(function () {
|
||||
|
||||
var
|
||||
|
|
@ -270,7 +255,6 @@ LoginViewModel.prototype.onBuild = function ()
|
|||
}
|
||||
|
||||
this.email(RL.data().devEmail);
|
||||
this.login(RL.data().devLogin);
|
||||
this.password(RL.data().devPassword);
|
||||
|
||||
if (this.googleLoginEnabled())
|
||||
|
|
|
|||
|
|
@ -9,32 +9,23 @@ function PopupsAddAccountViewModel()
|
|||
KnoinAbstractViewModel.call(this, 'Popups', 'PopupsAddAccount');
|
||||
|
||||
this.email = ko.observable('');
|
||||
this.login = ko.observable('');
|
||||
this.password = ko.observable('');
|
||||
|
||||
this.emailError = ko.observable(false);
|
||||
this.loginError = ko.observable(false);
|
||||
this.passwordError = ko.observable(false);
|
||||
|
||||
this.email.subscribe(function () {
|
||||
this.emailError(false);
|
||||
}, this);
|
||||
|
||||
this.login.subscribe(function () {
|
||||
this.loginError(false);
|
||||
}, this);
|
||||
|
||||
this.password.subscribe(function () {
|
||||
this.passwordError(false);
|
||||
}, this);
|
||||
|
||||
this.allowCustomLogin = RL.data().allowCustomLogin;
|
||||
|
||||
this.submitRequest = ko.observable(false);
|
||||
this.submitError = ko.observable('');
|
||||
|
||||
this.emailFocus = ko.observable(false);
|
||||
this.loginFocus = ko.observable(false);
|
||||
|
||||
this.addAccountCommand = Utils.createCommand(this, function () {
|
||||
|
||||
|
|
@ -68,7 +59,7 @@ function PopupsAddAccountViewModel()
|
|||
this.submitError(Utils.getNotification(Enums.Notification.UnknownError));
|
||||
}
|
||||
|
||||
}, this), this.email(), this.allowCustomLogin() ? this.login() : '', this.password());
|
||||
}, this), this.email(), '', this.password());
|
||||
|
||||
return true;
|
||||
|
||||
|
|
@ -76,13 +67,6 @@ function PopupsAddAccountViewModel()
|
|||
return !this.submitRequest();
|
||||
});
|
||||
|
||||
this.loginFocus.subscribe(function (bValue) {
|
||||
if (bValue && '' === this.login() && '' !== this.email())
|
||||
{
|
||||
this.login(this.email());
|
||||
}
|
||||
}, this);
|
||||
|
||||
Knoin.constructorEnd(this);
|
||||
}
|
||||
|
||||
|
|
@ -91,11 +75,9 @@ Utils.extendAsViewModel('PopupsAddAccountViewModel', PopupsAddAccountViewModel);
|
|||
PopupsAddAccountViewModel.prototype.clearPopup = function ()
|
||||
{
|
||||
this.email('');
|
||||
this.login('');
|
||||
this.password('');
|
||||
|
||||
this.emailError(false);
|
||||
this.loginError(false);
|
||||
this.passwordError(false);
|
||||
|
||||
this.submitRequest(false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue