summary refs log tree commit diff
path: root/synapse/rest
diff options
context:
space:
mode:
authorDirk Klimpel <5740567+dklimpel@users.noreply.github.com>2020-02-28 10:58:05 +0100
committerGitHub <noreply@github.com>2020-02-28 09:58:05 +0000
commit9b06d8f8a62dc5c423aa9a694e0759eaf1c3c77e (patch)
tree0b3ada818ba583d277b3b7c5b48d046b4fe84329 /synapse/rest
parentMerge remote-tracking branch 'origin/release-v1.11.1' into develop (diff)
downloadsynapse-9b06d8f8a62dc5c423aa9a694e0759eaf1c3c77e.tar.xz
Fixed set a user as an admin with the new API (#6928)
Fix #6910 
Diffstat (limited to 'synapse/rest')
-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, {}