Add Admin API capability to set adminship of a user (#5878)

Admin API: Set adminship of a user
This commit is contained in:
reivilibre 2019-08-27 10:14:00 +01:00 committed by GitHub
parent 8767b63a82
commit 1a7e6eb633
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 132 additions and 0 deletions

View file

@ -84,3 +84,23 @@ with a body of:
}
including an ``access_token`` of a server admin.
Change whether a user is a server administrator or not
======================================================
Note that you cannot demote yourself.
The api is::
PUT /_synapse/admin/v1/users/<user_id>/admin
with a body of:
.. code:: json
{
"admin": true
}
including an ``access_token`` of a server admin.