Merge pull request #5914 from matrix-org/rei/admin_getadmin

Add GET method to admin API /users/@user:dom/admin
This commit is contained in:
reivilibre 2019-08-28 09:44:22 +01:00 committed by GitHub
commit a3f0635686
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 62 additions and 9 deletions

View file

@ -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.