summary refs log tree commit diff
path: root/synapse/rest/admin/users.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-03-24 13:29:30 +0000
committerAndrew Morgan <andrew@amorgan.xyz>2020-03-24 13:29:30 +0000
commit4c75c20fc56936d5c5ac69c45aa3de3256a506b8 (patch)
treedfc324a12e89dca037818eadec1f589176b7deb7 /synapse/rest/admin/users.py
parentDon't refuse to start worker if media listener configured. (#7002) (diff)
parentFixed set a user as an admin with the new API (#6928) (diff)
downloadsynapse-4c75c20fc56936d5c5ac69c45aa3de3256a506b8.tar.xz
Fixed set a user as an admin with the new API (#6928)
* commit '9b06d8f8a':
  Fixed set a user as an admin with the new API (#6928)
Diffstat (limited to 'synapse/rest/admin/users.py')
-rw-r--r--synapse/rest/admin/users.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/synapse/rest/admin/users.py b/synapse/rest/admin/users.py

index c5b461a236..80f959248d 100644 --- a/synapse/rest/admin/users.py +++ b/synapse/rest/admin/users.py
@@ -211,9 +211,7 @@ class UserRestServletV2(RestServlet): if target_user == auth_user and not set_admin_to: raise SynapseError(400, "You may not demote yourself.") - await self.admin_handler.set_user_server_admin( - target_user, set_admin_to - ) + await self.store.set_server_admin(target_user, set_admin_to) if "password" in body: if ( @@ -651,6 +649,6 @@ class UserAdminServlet(RestServlet): if target_user == auth_user and not set_admin_to: raise SynapseError(400, "You may not demote yourself.") - await self.store.set_user_server_admin(target_user, set_admin_to) + await self.store.set_server_admin(target_user, set_admin_to) return 200, {}