diff options
author | Dirk Klimpel <5740567+dklimpel@users.noreply.github.com> | 2020-02-28 10:58:05 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2020-03-02 13:28:50 +0000 |
commit | bbeee33d63c43cb80118c0dccf8abd9d4ac1b8f3 (patch) | |
tree | c03fe474f314527117e1f97b6af18021e0412e9f /synapse/rest | |
parent | Cast a coroutine into a Deferred in the federation base (#6996) (diff) | |
download | synapse-bbeee33d63c43cb80118c0dccf8abd9d4ac1b8f3.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.py | 6 |
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, {} |