summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorOlivier Wilkinson (reivilibre) <olivier@librepush.net>2019-08-27 13:12:27 +0100
committerOlivier Wilkinson (reivilibre) <olivier@librepush.net>2019-08-27 13:12:27 +0100
commitc88a119259c8625b015db4cf8ea08e30ca16cc81 (patch)
tree200b8f103f2c8914306933516cad8f469199a013 /synapse/handlers
parentAdd Admin API capability to set adminship of a user (#5878) (diff)
downloadsynapse-c88a119259c8625b015db4cf8ea08e30ca16cc81.tar.xz
Add GET method to admin API /users/@user:dom/admin
Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net>
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/admin.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/synapse/handlers/admin.py b/synapse/handlers/admin.py
index d30a68b650..1a87b58838 100644
--- a/synapse/handlers/admin.py
+++ b/synapse/handlers/admin.py
@@ -94,6 +94,15 @@ class AdminHandler(BaseHandler):
 
         return ret
 
+    def get_user_server_admin(self, user):
+        """
+        Get the admin bit on a user.
+
+        Args:
+            user_id (UserID): the (necessarily local) user to manipulate
+        """
+        return self.store.is_server_admin(user)
+
     def set_user_server_admin(self, user, admin):
         """
         Set the admin bit on a user.