Fix wording for globs in policy lists (#1165)

* Fix wording for globs in policy lists

The specification here does neither match how globs work in common
libraries nor do they match how they are used in practice currently or
how the MSC worded them (which said they should be like server ACLs). As
such this seems to be an issue introduced when writing the spec text.

Ref mjolnir:
- b48904bc2b/src/models/ListRule.ts (L44)

Ref matrix bot sdk (which implements the glob used above):
- 473e563236/src/helpers/MatrixGlob.ts (L26)
- f799b1fe1a/test/helpers/MatrixGlobTest.ts (L44)

Ref original MSC:
- c7b3d99853/proposals/2313-moderation-policy-rooms.md?plain=1#L36
- https://spec.matrix.org/v1.3/client-server-api/#server-access-control-lists-acls-for-rooms

fixes https://github.com/matrix-org/matrix-spec/issues/17

Signed-off-by: Nicolas Werner <nicolas.werner@hotmail.de>

* Add changelog

Signed-off-by: Nicolas Werner <nicolas.werner@hotmail.de>
pull/1166/head
DeepBlueV7.X 2 years ago committed by GitHub
parent adf8f4817d
commit 5bf35327c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1 @@
Clarify that policy rule globs work like ACL globs. Contributed by Nico.

@ -91,7 +91,7 @@ included in the ban list.
#### Events #### Events
The `entity` described by the state events can contain `*` and `?` to The `entity` described by the state events can contain `*` and `?` to
match zero or more and one or more characters respectively. Note that match zero or more characters and exactly one character respectively. Note that
rules against rooms can describe a room ID or room alias - the rules against rooms can describe a room ID or room alias - the
subscriber is responsible for resolving the alias to a room ID if subscriber is responsible for resolving the alias to a room ID if
desired. desired.

@ -15,7 +15,7 @@ properties:
entity: entity:
description: |- description: |-
The entity affected by this rule. Glob characters `*` and `?` can be used The entity affected by this rule. Glob characters `*` and `?` can be used
to match zero or more and one or more characters respectively. to match zero or more characters or exactly one character respectively.
type: string type: string
recommendation: recommendation:
description: The suggested action to take. Currently only `m.ban` is specified. description: The suggested action to take. Currently only `m.ban` is specified.

Loading…
Cancel
Save