mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 12:09:20 +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
|
|
@ -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