diff options
author | Brendan Abolivier <babolivier@matrix.org> | 2019-06-24 11:45:11 +0100 |
---|---|---|
committer | Brendan Abolivier <babolivier@matrix.org> | 2019-06-24 15:42:31 +0100 |
commit | bfe84e051e8472a1c3534e1287f1fb727df63259 (patch) | |
tree | 519b95c690cf4c6c81eb9c22bcbb4773ba7e894b /synapse/federation/transport | |
parent | Pass config_dir_path and data_dir_path into Config.read_config. (#5522) (diff) | |
download | synapse-bfe84e051e8472a1c3534e1287f1fb727df63259.tar.xz |
Split public rooms directory auth config in two
Diffstat (limited to 'synapse/federation/transport')
-rw-r--r-- | synapse/federation/transport/server.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/federation/transport/server.py b/synapse/federation/transport/server.py index b4854e82f6..955f0f4308 100644 --- a/synapse/federation/transport/server.py +++ b/synapse/federation/transport/server.py @@ -721,15 +721,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) @@ -1436,7 +1436,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: |