diff options
author | reivilibre <38398653+reivilibre@users.noreply.github.com> | 2019-08-28 09:44:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-28 09:44:22 +0100 |
commit | a3f06356860de1ff727a8df1f38ea4afd5d70bd5 (patch) | |
tree | 9894346894a293b4214fc723890af1593eb18c5f /synapse/handlers/admin.py | |
parent | Typographical corrections in docker/README (#5921) (diff) | |
parent | Document GET method for retrieving admin bit of user in admin API (diff) | |
download | synapse-a3f06356860de1ff727a8df1f38ea4afd5d70bd5.tar.xz |
Merge pull request #5914 from matrix-org/rei/admin_getadmin
Add GET method to admin API /users/@user:dom/admin
Diffstat (limited to 'synapse/handlers/admin.py')
-rw-r--r-- | synapse/handlers/admin.py | 9 |
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. |