Mercurial > gemma
changeset 5539:90ba92820b26 aggregate-gm-import-logging
Merged default into aggregate-gm-import-logging branch.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Tue, 26 Oct 2021 00:05:28 +0200 |
parents | ff95d3603e4d (current diff) fcab36751490 (diff) |
children | 4d815f295e57 |
files | |
diffstat | 1 files changed, 15 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/usermanagement/Userdetail.vue Mon Oct 25 23:05:45 2021 +0200 +++ b/client/src/components/usermanagement/Userdetail.vue Tue Oct 26 00:05:28 2021 +0200 @@ -287,7 +287,10 @@ isEmailValid(this.currentUser.email) && this.currentUser.country && this.password === this.passwordre && - (this.password === "" || !violatedPasswordRules(this.password)) + ((this.currentUser.active && + (this.password === "" || !violatedPasswordRules(this.password))) || + // Do not accept empty password by user-reactivation + (!this.currentUser.active && !violatedPasswordRules(this.password))) ); } }, @@ -326,12 +329,21 @@ this.password === this.passwordre ? "" : this.$gettext("Passwords do not match!"); - this.errors.password = - this.password === "" || !violatedPasswordRules(this.password) + if (this.currentUser.active) { + this.errors.password = + this.password === "" || !violatedPasswordRules(this.password) + ? "" + : this.$gettext( + "Password should at least be 8 char long including 1 digit and 1 special char like $" + ); + } else { + // Force entering password for user-reactivation + this.errors.password = !violatedPasswordRules(this.password) ? "" : this.$gettext( "Password should at least be 8 char long including 1 digit and 1 special char like $" ); + } }, validateEmailaddress() { this.errors.email = isEmailValid(this.currentUser.email)