summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-02-14 18:07:24 +0000
committerErik Johnston <erik@matrix.org>2019-02-14 18:07:24 +0000
commitf666fe36d7a17d12e962461aeba61f5b7ca43ccf (patch)
tree26fe33e26047cbcd5b714c0af3c843524de6035d
parentNewsfile (diff)
downloadsynapse-f666fe36d7a17d12e962461aeba61f5b7ca43ccf.tar.xz
Fixup comments
-rw-r--r--synapse/config/room_directory.py23
1 files changed, 15 insertions, 8 deletions
diff --git a/synapse/config/room_directory.py b/synapse/config/room_directory.py
index a0869ed6ab..719892be7a 100644
--- a/synapse/config/room_directory.py
+++ b/synapse/config/room_directory.py
@@ -48,20 +48,21 @@ class RoomDirectoryConfig(Config):
         #
         # If no rules match the request is denied.
         alias_creation_rules:
-            - user_id: "*"
-              alias: "*"      # This matches alias being created
-              room_id: "*"
+            - user_id: "*"    # Matches agaisnt the creator of the alias
+              alias: "*"      # Matches against the alias being created
+              room_id: "*"    # Matches against the room ID the alias is being
+                              # pointed at
               action: allow
 
-        # The `room_list_publication_rules` option control who and what can be
-        # published in the public room list.
+        # The `room_list_publication_rules` option controls who can publish and
+        # which rooms can be published in the public room list.
         #
         # The format of this option is the same as that for
         # `alias_creation_rules`
         room_list_publication_rules:
-            - user_id: "*"
-              alias: "*"      # This matches any local or canonical alias
-                              # associated with the room
+            - user_id: "*"    # Matches against the user publishing the room
+              alias: "*"      # Matches against any current local or canonical
+                              # aliases associated with the room
               room_id: "*"
               action: allow
         """
@@ -107,6 +108,12 @@ class _RoomDirectoryRule(object):
     """
 
     def __init__(self, option_name, rule):
+        """
+        Args:
+            option_name (str): Name of the config option this rule belongs to
+            rule (dict): The rule as specified in the config
+        """
+
         action = rule["action"]
         user_id = rule.get("user_id", "*")
         room_id = rule.get("room_id", "*")