mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-01 19:36:09 -04:00
async/await is_server_admin (#7363)
This commit is contained in:
parent
2e8955f4a6
commit
6b22921b19
22 changed files with 410 additions and 438 deletions
|
@ -273,8 +273,7 @@ class RegistrationWorkerStore(SQLBaseStore):
|
|||
desc="delete_account_validity_for_user",
|
||||
)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def is_server_admin(self, user):
|
||||
async def is_server_admin(self, user):
|
||||
"""Determines if a user is an admin of this homeserver.
|
||||
|
||||
Args:
|
||||
|
@ -283,7 +282,7 @@ class RegistrationWorkerStore(SQLBaseStore):
|
|||
Returns (bool):
|
||||
true iff the user is a server admin, false otherwise.
|
||||
"""
|
||||
res = yield self.db.simple_select_one_onecol(
|
||||
res = await self.db.simple_select_one_onecol(
|
||||
table="users",
|
||||
keyvalues={"name": user.to_string()},
|
||||
retcol="admin",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue