Consistently check whether a password may be set for a user. (#9636)

This commit is contained in:
Dirk Klimpel 2021-03-18 17:54:08 +01:00 committed by GitHub
parent dd71eb0f8a
commit 8dd2ea65a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 133 additions and 68 deletions

View file

@ -271,7 +271,7 @@ class UserRestServletV2(RestServlet):
elif not deactivate and user["deactivated"]:
if (
"password" not in body
and self.hs.config.password_localdb_enabled
and self.auth_handler.can_change_password()
):
raise SynapseError(
400, "Must provide a password to re-activate an account."