Split public rooms directory auth config in two

This commit is contained in:
Brendan Abolivier 2019-06-24 11:45:11 +01:00
parent c3c6b00d95
commit bfe84e051e
6 changed files with 49 additions and 20 deletions

View file

@ -311,7 +311,7 @@ class PublicRoomListRestServlet(TransactionRestServlet):
# Option to allow servers to require auth when accessing
# /publicRooms via CS API. This is especially helpful in private
# federations.
if self.hs.config.restrict_public_rooms_to_local_users:
if not self.hs.config.allow_public_rooms_without_auth:
raise
# We allow people to not be authed if they're just looking at our