mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 22:14:55 -04:00
Factor out an "assert_requester_is_admin" function (#5120)
Rather than copying-and-pasting the same four lines hundreds of times
This commit is contained in:
parent
1df2f80367
commit
0836cbb9f5
4 changed files with 81 additions and 76 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue