is_server_admin
parent
6e23dd4c20
commit
aa5745885a
|
@ -273,8 +273,7 @@ class RegistrationWorkerStore(SQLBaseStore):
|
||||||
desc="delete_account_validity_for_user",
|
desc="delete_account_validity_for_user",
|
||||||
)
|
)
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
async def is_server_admin(self, user):
|
||||||
def is_server_admin(self, user):
|
|
||||||
"""Determines if a user is an admin of this homeserver.
|
"""Determines if a user is an admin of this homeserver.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -283,7 +282,7 @@ class RegistrationWorkerStore(SQLBaseStore):
|
||||||
Returns (bool):
|
Returns (bool):
|
||||||
true iff the user is a server admin, false otherwise.
|
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",
|
table="users",
|
||||||
keyvalues={"name": user.to_string()},
|
keyvalues={"name": user.to_string()},
|
||||||
retcol="admin",
|
retcol="admin",
|
||||||
|
|
Loading…
Reference in New Issue