summary refs log tree commit diff
path: root/synapse/api
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2020-06-05 14:33:49 +0100
committerGitHub <noreply@github.com>2020-06-05 14:33:49 +0100
commiteea124370bbf8667cbd6a6af418d9df67654ce34 (patch)
treeecaf072f7f089ec149580b775fb6abc6270f5e4a /synapse/api
parentRemove some unused constants. (#7644) (diff)
downloadsynapse-eea124370bbf8667cbd6a6af418d9df67654ce34.tar.xz
Fix type information on `assert_*_is_admin` methods (#7645)
These things don't return Deferreds.
Diffstat (limited to 'synapse/api')
-rw-r--r--synapse/api/auth.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py
index 3c660318fc..06ade25674 100644
--- a/synapse/api/auth.py
+++ b/synapse/api/auth.py
@@ -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,