summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorDirk Klimpel <5740567+dklimpel@users.noreply.github.com>2021-03-11 14:52:32 +0100
committerGitHub <noreply@github.com>2021-03-11 13:52:32 +0000
commit70d1b6abff125c0dd5022d1394548ee12367b371 (patch)
tree8aa484dd5fb6acfb00a60b5882ad684920318141 /synapse
parentConvert Requester to attrs (#9586) (diff)
downloadsynapse-70d1b6abff125c0dd5022d1394548ee12367b371.tar.xz
Re-Activating account when local passwords are disabled (#9587)
Fixes: #8393
Diffstat (limited to 'synapse')
-rw-r--r--synapse/rest/admin/users.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/rest/admin/users.py b/synapse/rest/admin/users.py
index 267a993430..2c89b62e25 100644
--- a/synapse/rest/admin/users.py
+++ b/synapse/rest/admin/users.py
@@ -269,7 +269,10 @@ class UserRestServletV2(RestServlet):
                         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."
                         )