summary refs log tree commit diff
path: root/synapse/handlers/admin.py
diff options
context:
space:
mode:
authorreivilibre <38398653+reivilibre@users.noreply.github.com>2019-08-27 10:14:00 +0100
committerGitHub <noreply@github.com>2019-08-27 10:14:00 +0100
commit1a7e6eb63387704ef379bf962318f710ce5ae5f3 (patch)
treed758ab954a9fbad9db495f76e0c59ef43ea7b766 /synapse/handlers/admin.py
parentPropagate opentracing contexts through EDUs (#5852) (diff)
downloadsynapse-1a7e6eb63387704ef379bf962318f710ce5ae5f3.tar.xz
Add Admin API capability to set adminship of a user (#5878)
Admin API: Set adminship of a user
Diffstat (limited to 'synapse/handlers/admin.py')
-rw-r--r--synapse/handlers/admin.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/synapse/handlers/admin.py b/synapse/handlers/admin.py
index 2f22f56ca4..d30a68b650 100644
--- a/synapse/handlers/admin.py
+++ b/synapse/handlers/admin.py
@@ -94,6 +94,16 @@ class AdminHandler(BaseHandler):
 
         return ret
 
+    def set_user_server_admin(self, user, admin):
+        """
+        Set the admin bit on a user.
+
+        Args:
+            user_id (UserID): the (necessarily local) user to manipulate
+            admin (bool): whether or not the user should be an admin of this server
+        """
+        return self.store.set_server_admin(user, admin)
+
     @defer.inlineCallbacks
     def export_user_data(self, user_id, writer):
         """Write all data we have on the user to the given writer.