mirror of
https://github.com/element-hq/synapse.git
synced 2024-12-22 04:34:28 +03:00
Revert "block non-admins from publishing to room directory"
This reverts commit e34f406cfd
.
This commit is contained in:
parent
09885e1a33
commit
656a007c70
2 changed files with 1 additions and 13 deletions
|
@ -888,9 +888,7 @@ class RoomCreationHandler:
|
|||
|
||||
# The spec says rooms should default to private visibility if
|
||||
# `visibility` is not specified.
|
||||
#visibility = config.get("visibility", "private")
|
||||
# temporarily block publishing rooms to directory - patch date 12/12/23
|
||||
visibility = "private"
|
||||
visibility = config.get("visibility", "private")
|
||||
is_public = visibility == "public"
|
||||
|
||||
self._validate_room_config(config, visibility)
|
||||
|
|
|
@ -166,16 +166,6 @@ class ClientDirectoryListServer(RestServlet):
|
|||
|
||||
content = parse_and_validate_json_object_from_request(request, self.PutBody)
|
||||
|
||||
# temporarily block publishing rooms to public directory for non-admins
|
||||
# patch date 12/12/23
|
||||
if content.visibility == "public":
|
||||
is_admin = await self.auth.is_server_admin(requester)
|
||||
if not is_admin:
|
||||
raise AuthError(
|
||||
403,
|
||||
"Publishing rooms to the room list is temporarily disabled.",
|
||||
)
|
||||
|
||||
await self.directory_handler.edit_published_room_list(
|
||||
requester, room_id, content.visibility
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue