Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Re-Activating account when local passwords are disabled (#9587)
Browse files Browse the repository at this point in the history
Fixes: #8393
  • Loading branch information
dklimpel committed Mar 11, 2021
1 parent a7a3790 commit 70d1b6a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/9587.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Re-Activating account with admin API when local passwords are disabled.
5 changes: 4 additions & 1 deletion synapse/rest/admin/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,10 @@ async def on_PUT(
target_user.to_string(), False, requester, by_admin=True
)
elif not deactivate and user["deactivated"]:
if "password" not in body:
if (
"password" not in body
and self.hs.config.password_localdb_enabled
):
raise SynapseError(
400, "Must provide a password to re-activate an account."
)
Expand Down

0 comments on commit 70d1b6a

Please sign in to comment.