mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 19:24:52 -04:00
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.
This commit is contained in:
parent
a0a1fd0bec
commit
709e81f518
2 changed files with 20 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue