deploy: 6ec98810e394588d0ff000b1875c8b70edc8c327

This commit is contained in:
DMRobertson 2023-10-24 12:27:50 +00:00
parent 42c609e950
commit d1694b49a0
4 changed files with 220 additions and 74 deletions

View File

@ -6985,53 +6985,126 @@ users by always returning an empty list for all queries. Defaults to true.</p>
</code></pre> </code></pre>
<hr /> <hr />
<h3 id="alias_creation_rules"><a class="header" href="#alias_creation_rules"><code>alias_creation_rules</code></a></h3> <h3 id="alias_creation_rules"><a class="header" href="#alias_creation_rules"><code>alias_creation_rules</code></a></h3>
<p>The <code>alias_creation_rules</code> option controls who is allowed to create aliases <p>The <code>alias_creation_rules</code> option allows server admins to prevent unwanted
on this server.</p> alias creation on this server.</p>
<p>The format of this option is a list of rules that contain globs that <p>This setting is an optional list of 0 or more rules. By default, no list is
match against user_id, room_id and the new alias (fully qualified with provided, meaning that all alias creations are permitted.</p>
server name). The action in the first rule that matches is taken, <p>Otherwise, requests to create aliases are matched against each rule in order.
which can currently either be &quot;allow&quot; or &quot;deny&quot;.</p> The first rule that matches decides if the request is allowed or denied. If no
<p>Missing user_id/room_id/alias fields default to &quot;*&quot;.</p> rule matches, the request is denied. In particular, this means that configuring
<p>If no rules match the request is denied. An empty list means no one an empty list of rules will deny every alias creation request.</p>
can create aliases.</p> <p>Each rule is a YAML object containing four fields, each of which is an optional string:</p>
<p>Options for the rules include:</p>
<ul> <ul>
<li><code>user_id</code>: Matches against the creator of the alias. Defaults to &quot;*&quot;.</li> <li><code>user_id</code>: a glob pattern that matches against the creator of the alias.</li>
<li><code>alias</code>: Matches against the alias being created. Defaults to &quot;*&quot;.</li> <li><code>alias</code>: a glob pattern that matches against the alias being created.</li>
<li><code>room_id</code>: Matches against the room ID the alias is being pointed at. Defaults to &quot;*&quot;</li> <li><code>room_id</code>: a glob pattern that matches against the room ID the alias is being pointed at.</li>
<li><code>action</code>: Whether to &quot;allow&quot; or &quot;deny&quot; the request if the rule matches. Defaults to allow.</li> <li><code>action</code>: either <code>allow</code> or <code>deny</code>. What to do with the request if the rule matches. Defaults to <code>allow</code>.</li>
</ul> </ul>
<p>Each of the glob patterns is optional, defaulting to <code>*</code> (&quot;match anything&quot;).
Note that the patterns match against fully qualified IDs, e.g. against
<code>@alice:example.com</code>, <code>#room:example.com</code> and <code>!abcdefghijk:example.com</code> instead
of <code>alice</code>, <code>room</code> and <code>abcedgghijk</code>.</p>
<p>Example configuration:</p> <p>Example configuration:</p>
<pre><code class="language-yaml">alias_creation_rules: <pre><code class="language-yaml"># No rule list specified. All alias creations are allowed.
- user_id: &quot;bad_user&quot; # This is the default behaviour.
alias: &quot;spammy_alias&quot; alias_creation_rules:
room_id: &quot;*&quot; </code></pre>
<pre><code class="language-yaml"># A list of one rule which allows everything.
# This has the same effect as the previous example.
alias_creation_rules:
- &quot;action&quot;: &quot;allow&quot;
</code></pre>
<pre><code class="language-yaml"># An empty list of rules. All alias creations are denied.
alias_creation_rules: []
</code></pre>
<pre><code class="language-yaml"># A list of one rule which denies everything.
# This has the same effect as the previous example.
alias_creation_rules:
- &quot;action&quot;: &quot;deny&quot;
</code></pre>
<pre><code class="language-yaml"># Prevent a specific user from creating aliases.
# Allow other users to create any alias
alias_creation_rules:
- user_id: &quot;@bad_user:example.com&quot;
action: deny action: deny
- action: allow
</code></pre>
<pre><code class="language-yaml"># Prevent aliases being created which point to a specific room.
alias_creation_rules:
- room_id: &quot;!forbiddenRoom:example.com&quot;
action: deny
- action: allow
</code></pre> </code></pre>
<hr /> <hr />
<h3 id="room_list_publication_rules"><a class="header" href="#room_list_publication_rules"><code>room_list_publication_rules</code></a></h3> <h3 id="room_list_publication_rules"><a class="header" href="#room_list_publication_rules"><code>room_list_publication_rules</code></a></h3>
<p>The <code>room_list_publication_rules</code> option controls who can publish and <p>The <code>room_list_publication_rules</code> option allows server admins to prevent
which rooms can be published in the public room list.</p> unwanted entries from being published in the public room list.</p>
<p>The format of this option is the same as that for <p>The format of this option is the same as that for
<code>alias_creation_rules</code>.</p> <a href="usage/configuration/config_documentation.html#alias_creation_rules"><code>alias_creation_rules</code></a>: an optional list of 0 or more
<p>If the room has one or more aliases associated with it, only one of rules. By default, no list is provided, meaning that all rooms may be
the aliases needs to match the alias rule. If there are no aliases published to the room list.</p>
then only rules with <code>alias: *</code> match.</p> <p>Otherwise, requests to publish a room are matched against each rule in order.
<p>If no rules match the request is denied. An empty list means no one The first rule that matches decides if the request is allowed or denied. If no
can publish rooms.</p> rule matches, the request is denied. In particular, this means that configuring
<p>Options for the rules include:</p> an empty list of rules will deny every alias creation request.</p>
<p>Each rule is a YAML object containing four fields, each of which is an optional string:</p>
<ul> <ul>
<li><code>user_id</code>: Matches against the creator of the alias. Defaults to &quot;*&quot;.</li> <li><code>user_id</code>: a glob pattern that matches against the user publishing the room.</li>
<li><code>alias</code>: Matches against any current local or canonical aliases associated with the room. Defaults to &quot;*&quot;.</li> <li><code>alias</code>: a glob pattern that matches against one of published room's aliases.
<li><code>room_id</code>: Matches against the room ID being published. Defaults to &quot;*&quot;.</li> <ul>
<li><code>action</code>: Whether to &quot;allow&quot; or &quot;deny&quot; the request if the rule matches. Defaults to allow.</li> <li>If the room has no aliases, the alias match fails unless <code>alias</code> is unspecified or <code>*</code>.</li>
<li>If the room has exactly one alias, the alias match succeeds if the <code>alias</code> pattern matches that alias.</li>
<li>If the room has two or more aliases, the alias match succeeds if the pattern matches at least one of the aliases.</li>
</ul> </ul>
</li>
<li><code>room_id</code>: a glob pattern that matches against the room ID of the room being published.</li>
<li><code>action</code>: either <code>allow</code> or <code>deny</code>. What to do with the request if the rule matches. Defaults to <code>allow</code>.</li>
</ul>
<p>Each of the glob patterns is optional, defaulting to <code>*</code> (&quot;match anything&quot;).
Note that the patterns match against fully qualified IDs, e.g. against
<code>@alice:example.com</code>, <code>#room:example.com</code> and <code>!abcdefghijk:example.com</code> instead
of <code>alice</code>, <code>room</code> and <code>abcedgghijk</code>.</p>
<p>Example configuration:</p> <p>Example configuration:</p>
<pre><code class="language-yaml">room_list_publication_rules: <pre><code class="language-yaml"># No rule list specified. Anyone may publish any room to the public list.
- user_id: &quot;*&quot; # This is the default behaviour.
alias: &quot;*&quot; room_list_publication_rules:
room_id: &quot;*&quot; </code></pre>
action: allow <pre><code class="language-yaml"># A list of one rule which allows everything.
# This has the same effect as the previous example.
room_list_publication_rules:
- &quot;action&quot;: &quot;allow&quot;
</code></pre>
<pre><code class="language-yaml"># An empty list of rules. No-one may publish to the room list.
room_list_publication_rules: []
</code></pre>
<pre><code class="language-yaml"># A list of one rule which denies everything.
# This has the same effect as the previous example.
room_list_publication_rules:
- &quot;action&quot;: &quot;deny&quot;
</code></pre>
<pre><code class="language-yaml"># Prevent a specific user from publishing rooms.
# Allow other users to publish anything.
room_list_publication_rules:
- user_id: &quot;@bad_user:example.com&quot;
action: deny
- action: allow
</code></pre>
<pre><code class="language-yaml"># Prevent publication of a specific room.
room_list_publication_rules:
- room_id: &quot;!forbiddenRoom:example.com&quot;
action: deny
- action: allow
</code></pre>
<pre><code class="language-yaml"># Prevent publication of rooms with at least one alias containing the word &quot;potato&quot;.
room_list_publication_rules:
- alias: &quot;#*potato*:example.com&quot;
action: deny
- action: allow
</code></pre> </code></pre>
<hr /> <hr />
<h3 id="default_power_level_content_override"><a class="header" href="#default_power_level_content_override"><code>default_power_level_content_override</code></a></h3> <h3 id="default_power_level_content_override"><a class="header" href="#default_power_level_content_override"><code>default_power_level_content_override</code></a></h3>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -3439,53 +3439,126 @@ users by always returning an empty list for all queries. Defaults to true.</p>
</code></pre> </code></pre>
<hr /> <hr />
<h3 id="alias_creation_rules"><a class="header" href="#alias_creation_rules"><code>alias_creation_rules</code></a></h3> <h3 id="alias_creation_rules"><a class="header" href="#alias_creation_rules"><code>alias_creation_rules</code></a></h3>
<p>The <code>alias_creation_rules</code> option controls who is allowed to create aliases <p>The <code>alias_creation_rules</code> option allows server admins to prevent unwanted
on this server.</p> alias creation on this server.</p>
<p>The format of this option is a list of rules that contain globs that <p>This setting is an optional list of 0 or more rules. By default, no list is
match against user_id, room_id and the new alias (fully qualified with provided, meaning that all alias creations are permitted.</p>
server name). The action in the first rule that matches is taken, <p>Otherwise, requests to create aliases are matched against each rule in order.
which can currently either be &quot;allow&quot; or &quot;deny&quot;.</p> The first rule that matches decides if the request is allowed or denied. If no
<p>Missing user_id/room_id/alias fields default to &quot;*&quot;.</p> rule matches, the request is denied. In particular, this means that configuring
<p>If no rules match the request is denied. An empty list means no one an empty list of rules will deny every alias creation request.</p>
can create aliases.</p> <p>Each rule is a YAML object containing four fields, each of which is an optional string:</p>
<p>Options for the rules include:</p>
<ul> <ul>
<li><code>user_id</code>: Matches against the creator of the alias. Defaults to &quot;*&quot;.</li> <li><code>user_id</code>: a glob pattern that matches against the creator of the alias.</li>
<li><code>alias</code>: Matches against the alias being created. Defaults to &quot;*&quot;.</li> <li><code>alias</code>: a glob pattern that matches against the alias being created.</li>
<li><code>room_id</code>: Matches against the room ID the alias is being pointed at. Defaults to &quot;*&quot;</li> <li><code>room_id</code>: a glob pattern that matches against the room ID the alias is being pointed at.</li>
<li><code>action</code>: Whether to &quot;allow&quot; or &quot;deny&quot; the request if the rule matches. Defaults to allow.</li> <li><code>action</code>: either <code>allow</code> or <code>deny</code>. What to do with the request if the rule matches. Defaults to <code>allow</code>.</li>
</ul> </ul>
<p>Each of the glob patterns is optional, defaulting to <code>*</code> (&quot;match anything&quot;).
Note that the patterns match against fully qualified IDs, e.g. against
<code>@alice:example.com</code>, <code>#room:example.com</code> and <code>!abcdefghijk:example.com</code> instead
of <code>alice</code>, <code>room</code> and <code>abcedgghijk</code>.</p>
<p>Example configuration:</p> <p>Example configuration:</p>
<pre><code class="language-yaml">alias_creation_rules: <pre><code class="language-yaml"># No rule list specified. All alias creations are allowed.
- user_id: &quot;bad_user&quot; # This is the default behaviour.
alias: &quot;spammy_alias&quot; alias_creation_rules:
room_id: &quot;*&quot; </code></pre>
<pre><code class="language-yaml"># A list of one rule which allows everything.
# This has the same effect as the previous example.
alias_creation_rules:
- &quot;action&quot;: &quot;allow&quot;
</code></pre>
<pre><code class="language-yaml"># An empty list of rules. All alias creations are denied.
alias_creation_rules: []
</code></pre>
<pre><code class="language-yaml"># A list of one rule which denies everything.
# This has the same effect as the previous example.
alias_creation_rules:
- &quot;action&quot;: &quot;deny&quot;
</code></pre>
<pre><code class="language-yaml"># Prevent a specific user from creating aliases.
# Allow other users to create any alias
alias_creation_rules:
- user_id: &quot;@bad_user:example.com&quot;
action: deny action: deny
- action: allow
</code></pre>
<pre><code class="language-yaml"># Prevent aliases being created which point to a specific room.
alias_creation_rules:
- room_id: &quot;!forbiddenRoom:example.com&quot;
action: deny
- action: allow
</code></pre> </code></pre>
<hr /> <hr />
<h3 id="room_list_publication_rules"><a class="header" href="#room_list_publication_rules"><code>room_list_publication_rules</code></a></h3> <h3 id="room_list_publication_rules"><a class="header" href="#room_list_publication_rules"><code>room_list_publication_rules</code></a></h3>
<p>The <code>room_list_publication_rules</code> option controls who can publish and <p>The <code>room_list_publication_rules</code> option allows server admins to prevent
which rooms can be published in the public room list.</p> unwanted entries from being published in the public room list.</p>
<p>The format of this option is the same as that for <p>The format of this option is the same as that for
<code>alias_creation_rules</code>.</p> <a href="#alias_creation_rules"><code>alias_creation_rules</code></a>: an optional list of 0 or more
<p>If the room has one or more aliases associated with it, only one of rules. By default, no list is provided, meaning that all rooms may be
the aliases needs to match the alias rule. If there are no aliases published to the room list.</p>
then only rules with <code>alias: *</code> match.</p> <p>Otherwise, requests to publish a room are matched against each rule in order.
<p>If no rules match the request is denied. An empty list means no one The first rule that matches decides if the request is allowed or denied. If no
can publish rooms.</p> rule matches, the request is denied. In particular, this means that configuring
<p>Options for the rules include:</p> an empty list of rules will deny every alias creation request.</p>
<p>Each rule is a YAML object containing four fields, each of which is an optional string:</p>
<ul> <ul>
<li><code>user_id</code>: Matches against the creator of the alias. Defaults to &quot;*&quot;.</li> <li><code>user_id</code>: a glob pattern that matches against the user publishing the room.</li>
<li><code>alias</code>: Matches against any current local or canonical aliases associated with the room. Defaults to &quot;*&quot;.</li> <li><code>alias</code>: a glob pattern that matches against one of published room's aliases.
<li><code>room_id</code>: Matches against the room ID being published. Defaults to &quot;*&quot;.</li> <ul>
<li><code>action</code>: Whether to &quot;allow&quot; or &quot;deny&quot; the request if the rule matches. Defaults to allow.</li> <li>If the room has no aliases, the alias match fails unless <code>alias</code> is unspecified or <code>*</code>.</li>
<li>If the room has exactly one alias, the alias match succeeds if the <code>alias</code> pattern matches that alias.</li>
<li>If the room has two or more aliases, the alias match succeeds if the pattern matches at least one of the aliases.</li>
</ul> </ul>
</li>
<li><code>room_id</code>: a glob pattern that matches against the room ID of the room being published.</li>
<li><code>action</code>: either <code>allow</code> or <code>deny</code>. What to do with the request if the rule matches. Defaults to <code>allow</code>.</li>
</ul>
<p>Each of the glob patterns is optional, defaulting to <code>*</code> (&quot;match anything&quot;).
Note that the patterns match against fully qualified IDs, e.g. against
<code>@alice:example.com</code>, <code>#room:example.com</code> and <code>!abcdefghijk:example.com</code> instead
of <code>alice</code>, <code>room</code> and <code>abcedgghijk</code>.</p>
<p>Example configuration:</p> <p>Example configuration:</p>
<pre><code class="language-yaml">room_list_publication_rules: <pre><code class="language-yaml"># No rule list specified. Anyone may publish any room to the public list.
- user_id: &quot;*&quot; # This is the default behaviour.
alias: &quot;*&quot; room_list_publication_rules:
room_id: &quot;*&quot; </code></pre>
action: allow <pre><code class="language-yaml"># A list of one rule which allows everything.
# This has the same effect as the previous example.
room_list_publication_rules:
- &quot;action&quot;: &quot;allow&quot;
</code></pre>
<pre><code class="language-yaml"># An empty list of rules. No-one may publish to the room list.
room_list_publication_rules: []
</code></pre>
<pre><code class="language-yaml"># A list of one rule which denies everything.
# This has the same effect as the previous example.
room_list_publication_rules:
- &quot;action&quot;: &quot;deny&quot;
</code></pre>
<pre><code class="language-yaml"># Prevent a specific user from publishing rooms.
# Allow other users to publish anything.
room_list_publication_rules:
- user_id: &quot;@bad_user:example.com&quot;
action: deny
- action: allow
</code></pre>
<pre><code class="language-yaml"># Prevent publication of a specific room.
room_list_publication_rules:
- room_id: &quot;!forbiddenRoom:example.com&quot;
action: deny
- action: allow
</code></pre>
<pre><code class="language-yaml"># Prevent publication of rooms with at least one alias containing the word &quot;potato&quot;.
room_list_publication_rules:
- alias: &quot;#*potato*:example.com&quot;
action: deny
- action: allow
</code></pre> </code></pre>
<hr /> <hr />
<h3 id="default_power_level_content_override"><a class="header" href="#default_power_level_content_override"><code>default_power_level_content_override</code></a></h3> <h3 id="default_power_level_content_override"><a class="header" href="#default_power_level_content_override"><code>default_power_level_content_override</code></a></h3>