summary refs log tree commit diff
path: root/synapse/federation
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2019-06-24 11:45:11 +0100
committerBrendan Abolivier <babolivier@matrix.org>2019-06-24 16:41:48 +0100
commit84875301b679b33284824d9bc413becc10427987 (patch)
tree577d680284b7aa66ba6b8593bb062fc6c9df682f /synapse/federation
parentMerge pull request #5495 from matrix-org/babolivier/deactivate_bg_job_typo (diff)
downloadsynapse-84875301b679b33284824d9bc413becc10427987.tar.xz
Split public rooms directory auth config in two
Diffstat (limited to 'synapse/federation')
-rw-r--r--synapse/federation/transport/server.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/federation/transport/server.py b/synapse/federation/transport/server.py
index 949a5fb2aa..6cf213b895 100644
--- a/synapse/federation/transport/server.py
+++ b/synapse/federation/transport/server.py
@@ -720,15 +720,15 @@ class PublicRoomList(BaseFederationServlet):
 
     PATH = "/publicRooms"
 
-    def __init__(self, handler, authenticator, ratelimiter, server_name, deny_access):
+    def __init__(self, handler, authenticator, ratelimiter, server_name, allow_access):
         super(PublicRoomList, self).__init__(
             handler, authenticator, ratelimiter, server_name,
         )
-        self.deny_access = deny_access
+        self.allow_access = allow_access
 
     @defer.inlineCallbacks
     def on_GET(self, origin, content, query):
-        if self.deny_access:
+        if not self.allow_access:
             raise FederationDeniedError(origin)
 
         limit = parse_integer_from_args(query, "limit", 0)
@@ -1455,7 +1455,7 @@ def register_servlets(hs, resource, authenticator, ratelimiter, servlet_groups=N
                 authenticator=authenticator,
                 ratelimiter=ratelimiter,
                 server_name=hs.hostname,
-                deny_access=hs.config.restrict_public_rooms_to_local_users,
+                allow_access=hs.config.allow_public_rooms_over_federation,
             ).register(resource)
 
     if "group_server" in servlet_groups: