summary refs log tree commit diff
path: root/synapse/api/auth.py
diff options
context:
space:
mode:
authorRichard van der Hoff <github@rvanderhoff.org.uk>2017-09-19 16:08:14 +0100
committerGitHub <noreply@github.com>2017-09-19 16:08:14 +0100
commitaa620d09a01c226d7a6fbc0d839d8abd347a2b2e (patch)
tree497fc7af84c9a510e19bbff34e142cf6a799c52b /synapse/api/auth.py
parentadd some comments to on_exchange_third_party_invite_request (diff)
downloadsynapse-aa620d09a01c226d7a6fbc0d839d8abd347a2b2e.tar.xz
Add a config option to block all room invites (#2457)
- allows sysadmins the ability to lock down their servers so that people can't
send their users room invites.
Diffstat (limited to 'synapse/api/auth.py')
-rw-r--r--synapse/api/auth.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py
index e3da45b416..72858cca1f 100644
--- a/synapse/api/auth.py
+++ b/synapse/api/auth.py
@@ -519,6 +519,14 @@ class Auth(object):
             )
 
     def is_server_admin(self, user):
+        """ Check if the given user is a local server admin.
+
+        Args:
+            user (str): mxid of user to check
+
+        Returns:
+            bool: True if the user is an admin
+        """
         return self.store.is_server_admin(user)
 
     @defer.inlineCallbacks