mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-03-26 04:54:10 +01:00
Add knock_restricted to v10 auth
This commit is contained in:
parent
017461823b
commit
0eec78d8d6
|
|
@ -15,7 +15,17 @@ members of a room join either through knocking (introduced in [room version 7](/
|
||||||
or through "join restrictions" (introduced in [room version 8](/rooms/v8) and
|
or through "join restrictions" (introduced in [room version 8](/rooms/v8) and
|
||||||
refined in [room version 9](/rooms/v9)).
|
refined in [room version 9](/rooms/v9)).
|
||||||
|
|
||||||
Clients should render the new join rule accordingly for such rooms.
|
Clients should render the new join rule accordingly for such rooms. For example:
|
||||||
|
|
||||||
|
```
|
||||||
|
This room is:
|
||||||
|
[ ] Public
|
||||||
|
[x] Private
|
||||||
|
|
||||||
|
Join rules (disabled when Public):
|
||||||
|
[x] Allow members of `#space:example.org` to join
|
||||||
|
[x] Allow knocking
|
||||||
|
```
|
||||||
|
|
||||||
Clients which implement the redaction algorithm locally should refer to the
|
Clients which implement the redaction algorithm locally should refer to the
|
||||||
[redactions](#redactions) section below for a full overview.
|
[redactions](#redactions) section below for a full overview.
|
||||||
|
|
@ -115,7 +125,8 @@ The rules are as follows:
|
||||||
3. If the `sender` is banned, reject.
|
3. If the `sender` is banned, reject.
|
||||||
4. If the `join_rule` is `invite` or `knock` then allow if
|
4. If the `join_rule` is `invite` or `knock` then allow if
|
||||||
membership state is `invite` or `join`.
|
membership state is `invite` or `join`.
|
||||||
5. If the `join_rule` is `restricted`:
|
5. {{< changed-in this="true" >}}
|
||||||
|
If the `join_rule` is `restricted` or `knock_restricted`:
|
||||||
1. If membership state is `join` or `invite`, allow.
|
1. If membership state is `join` or `invite`, allow.
|
||||||
2. If the `join_authorised_via_users_server` key in `content`
|
2. If the `join_authorised_via_users_server` key in `content`
|
||||||
is not a user with sufficient permission to invite other
|
is not a user with sufficient permission to invite other
|
||||||
|
|
@ -170,7 +181,9 @@ The rules are as follows:
|
||||||
than the `sender`'s power level, allow.
|
than the `sender`'s power level, allow.
|
||||||
3. Otherwise, reject.
|
3. Otherwise, reject.
|
||||||
7. If `membership` is `knock`:
|
7. If `membership` is `knock`:
|
||||||
1. If the `join_rule` is anything other than `knock`, reject.
|
1. {{< changed-in this="true" >}}
|
||||||
|
If the `join_rule` is anything other than `knock` or
|
||||||
|
`knock_restricted`, reject.
|
||||||
2. If `sender` does not match `state_key`, reject.
|
2. If `sender` does not match `state_key`, reject.
|
||||||
3. If the `sender`'s current membership is not `ban`, `invite`,
|
3. If the `sender`'s current membership is not `ban`, `invite`,
|
||||||
or `join`, allow.
|
or `join`, allow.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue