Mercurial > gemma
changeset 5526:0b8efee7b549
Translation: Merge translations from weblate
author | Fadi Abbud <fadi.abbud@intevation.de> |
---|---|
date | Thu, 28 Oct 2021 09:59:41 +0200 |
parents | fcab36751490 (diff) 2e7848d264c7 (current diff) |
children | 819fda19f986 |
files | |
diffstat | 2 files changed, 17 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/usermanagement/Userdetail.vue Fri Oct 22 10:54:43 2021 +0200 +++ b/client/src/components/usermanagement/Userdetail.vue Thu Oct 28 09:59:41 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)