summary refs log tree commit diff
path: root/synapse/config/server.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/config/server.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/config/server.py')
-rw-r--r--synapse/config/server.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/synapse/config/server.py b/synapse/config/server.py
index 89d61a0503..c9a1715f1f 100644
--- a/synapse/config/server.py
+++ b/synapse/config/server.py
@@ -43,6 +43,12 @@ class ServerConfig(Config):
 
         self.filter_timeline_limit = config.get("filter_timeline_limit", -1)
 
+        # Whether we should block invites sent to users on this server
+        # (other than those sent by local server admins)
+        self.block_non_admin_invites = config.get(
+            "block_non_admin_invites", False,
+        )
+
         if self.public_baseurl is not None:
             if self.public_baseurl[-1] != '/':
                 self.public_baseurl += '/'
@@ -194,6 +200,10 @@ class ServerConfig(Config):
         # and sync operations. The default value is -1, means no upper limit.
         # filter_timeline_limit: 5000
 
+        # Whether room invites to users on this server should be blocked
+        # (except those sent by local server admins). The default is False.
+        # block_non_admin_invites: True
+
         # List of ports that Synapse should listen on, their purpose and their
         # configuration.
         listeners: