summary refs log tree commit diff
path: root/synapse/rest/admin/users.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2020-03-02 16:43:33 +0000
committerRichard van der Hoff <richard@matrix.org>2020-03-02 16:43:33 +0000
commit27d099edd66ee41c92d3c4603777c0a2fa897cc4 (patch)
tree0412b1ec5c7a294f5f87aa5ce8eed1a56653ec1e /synapse/rest/admin/users.py
parentMerge branch 'anoabolivier/sso-confirm' into 'release-v1.11.1' (diff)
parentFixed set a user as an admin with the new API (#6928) (diff)
downloadsynapse-27d099edd66ee41c92d3c4603777c0a2fa897cc4.tar.xz
Merge remote-tracking branch 'origin/release-v1.11.1' into release-v1.11.1
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 2107b5dc56..064908fbb0 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 (
@@ -648,6 +646,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, {}