mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 19:24:51 -04:00
Fix type information on assert_*_is_admin
methods (#7645)
These things don't return Deferreds.
This commit is contained in:
parent
b4f8dcb4bd
commit
eea124370b
3 changed files with 19 additions and 23 deletions
|
@ -510,16 +510,16 @@ class Auth(object):
|
|||
request.authenticated_entity = service.sender
|
||||
return defer.succeed(service)
|
||||
|
||||
def is_server_admin(self, user):
|
||||
async def is_server_admin(self, user: UserID) -> bool:
|
||||
""" Check if the given user is a local server admin.
|
||||
|
||||
Args:
|
||||
user (UserID): user to check
|
||||
user: user to check
|
||||
|
||||
Returns:
|
||||
bool: True if the user is an admin
|
||||
True if the user is an admin
|
||||
"""
|
||||
return self.store.is_server_admin(user)
|
||||
return await self.store.is_server_admin(user)
|
||||
|
||||
def compute_auth_events(
|
||||
self, event, current_state_ids: StateMap[str], for_verification: bool = False,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue