Fixup comments
This commit is contained in:
parent
4074c8b968
commit
f666fe36d7
|
@ -48,20 +48,21 @@ class RoomDirectoryConfig(Config):
|
||||||
#
|
#
|
||||||
# If no rules match the request is denied.
|
# If no rules match the request is denied.
|
||||||
alias_creation_rules:
|
alias_creation_rules:
|
||||||
- user_id: "*"
|
- user_id: "*" # Matches agaisnt the creator of the alias
|
||||||
alias: "*" # This matches alias being created
|
alias: "*" # Matches against the alias being created
|
||||||
room_id: "*"
|
room_id: "*" # Matches against the room ID the alias is being
|
||||||
|
# pointed at
|
||||||
action: allow
|
action: allow
|
||||||
|
|
||||||
# The `room_list_publication_rules` option control who and what can be
|
# The `room_list_publication_rules` option controls who can publish and
|
||||||
# published in the public room list.
|
# which rooms can be published in the public room list.
|
||||||
#
|
#
|
||||||
# The format of this option is the same as that for
|
# The format of this option is the same as that for
|
||||||
# `alias_creation_rules`
|
# `alias_creation_rules`
|
||||||
room_list_publication_rules:
|
room_list_publication_rules:
|
||||||
- user_id: "*"
|
- user_id: "*" # Matches against the user publishing the room
|
||||||
alias: "*" # This matches any local or canonical alias
|
alias: "*" # Matches against any current local or canonical
|
||||||
# associated with the room
|
# aliases associated with the room
|
||||||
room_id: "*"
|
room_id: "*"
|
||||||
action: allow
|
action: allow
|
||||||
"""
|
"""
|
||||||
|
@ -107,6 +108,12 @@ class _RoomDirectoryRule(object):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, option_name, rule):
|
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"]
|
action = rule["action"]
|
||||||
user_id = rule.get("user_id", "*")
|
user_id = rule.get("user_id", "*")
|
||||||
room_id = rule.get("room_id", "*")
|
room_id = rule.get("room_id", "*")
|
||||||
|
|
Loading…
Reference in New Issue