# HG changeset patch # User Sascha L. Teichmann # Date 1635199528 -7200 # Node ID 90ba92820b267b5e018ac669d6e38f3874617956 # Parent ff95d3603e4dcbbdf2eaab07a7e81badff19af67# Parent fcab367514902d5f438c3564b3c3cf42e5b399f8 Merged default into aggregate-gm-import-logging branch. diff -r ff95d3603e4d -r 90ba92820b26 client/src/components/usermanagement/Userdetail.vue --- 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)