mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 03:44:52 -04:00
Add Admin API capability to set adminship of a user (#5878)
Admin API: Set adminship of a user
This commit is contained in:
parent
8767b63a82
commit
1a7e6eb633
6 changed files with 132 additions and 0 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue