diff options
author | Richard van der Hoff <richard@matrix.org> | 2020-02-18 23:15:54 +0000 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2020-02-19 08:53:32 +0000 |
commit | 709e81f5183d8ff67d86f4569234cb4a8be7a8d4 (patch) | |
tree | 6b899ab71d6cc319515646169c813ab492c4bd97 /synapse/handlers | |
parent | Add `allow_departed_users` param to `check_in_room_or_world_readable` (diff) | |
download | synapse-709e81f5183d8ff67d86f4569234cb4a8be7a8d4.tar.xz |
Make room alias lists peekable
As per https://github.com/matrix-org/matrix-doc/pull/2432#pullrequestreview-360566830, make room alias lists accessible to users outside world_readable rooms.
Diffstat (limited to 'synapse/handlers')
-rw-r--r-- | synapse/handlers/directory.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/handlers/directory.py b/synapse/handlers/directory.py index 3f8c792149..db2104c5f6 100644 --- a/synapse/handlers/directory.py +++ b/synapse/handlers/directory.py @@ -463,7 +463,9 @@ class DirectoryHandler(BaseHandler): # allow access to server admins and current members of the room is_admin = await self.auth.is_server_admin(requester.user) if not is_admin: - await self.auth.check_joined_room(room_id, requester.user.to_string()) + await self.auth.check_user_in_room_or_world_readable( + room_id, requester.user.to_string() + ) aliases = await self.store.get_aliases_for_room(room_id) return aliases |