summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2024-04-15 15:56:09 +0100
committerAndrew Morgan <andrew@amorgan.xyz>2024-04-15 15:56:09 +0100
commit656a007c701fec061e2e397051e16ce58905db92 (patch)
treec4cb853aeb5f69647547f4eb2c225f86736ecc46 /synapse
parentMerge branch 'release-v1.105' into matrix-org-hotfixes (diff)
downloadsynapse-656a007c701fec061e2e397051e16ce58905db92.tar.xz
Revert "block non-admins from publishing to room directory"
This reverts commit e34f406cfd1ded69fb5c7d66321631679dac7ff6.
Diffstat (limited to 'synapse')
-rw-r--r--synapse/handlers/room.py4
-rw-r--r--synapse/rest/client/directory.py10
2 files changed, 1 insertions, 13 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py
index 6ad6a90054..5e81a51638 100644
--- a/synapse/handlers/room.py
+++ b/synapse/handlers/room.py
@@ -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)
diff --git a/synapse/rest/client/directory.py b/synapse/rest/client/directory.py
index bfd4e1557d..8099fdf3e4 100644
--- a/synapse/rest/client/directory.py
+++ b/synapse/rest/client/directory.py
@@ -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
         )