mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 19:54:53 -04:00
Add auth check to test if a user is an admin or not.
This commit is contained in:
parent
f7d80930f2
commit
c65306f877
2 changed files with 11 additions and 0 deletions
|
@ -259,6 +259,9 @@ class Auth(object):
|
|||
raise AuthError(403, "Unrecognised access token.",
|
||||
errcode=Codes.UNKNOWN_TOKEN)
|
||||
|
||||
def is_server_admin(self, user):
|
||||
return self.store.is_server_admin(user)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
@log_function
|
||||
def _can_send_event(self, event):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue