diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2019-05-02 10:45:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-02 10:45:52 +0100 |
commit | 0836cbb9f5aaf9260161fa998b2fe4c0ea7e692b (patch) | |
tree | 66855bbd4c8c77fa23f501819a715da2f83a246b /synapse/api/auth.py | |
parent | Merge pull request #5119 from matrix-org/rav/admin_api_urls (diff) | |
download | synapse-0836cbb9f5aaf9260161fa998b2fe4c0ea7e692b.tar.xz |
Factor out an "assert_requester_is_admin" function (#5120)
Rather than copying-and-pasting the same four lines hundreds of times
Diffstat (limited to 'synapse/api/auth.py')
-rw-r--r-- | synapse/api/auth.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py index 960e66dbdc..0c6c93a87b 100644 --- a/synapse/api/auth.py +++ b/synapse/api/auth.py @@ -556,7 +556,7 @@ class Auth(object): """ Check if the given user is a local server admin. Args: - user (str): mxid of user to check + user (UserID): user to check Returns: bool: True if the user is an admin |