From 0eec78d8d6cf420d5094ba48f1042e00cc02c893 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 30 May 2022 14:43:44 -0600 Subject: [PATCH] Add knock_restricted to v10 auth --- content/rooms/v10.md | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/content/rooms/v10.md b/content/rooms/v10.md index 2cc2bc44..7569ab8e 100644 --- a/content/rooms/v10.md +++ b/content/rooms/v10.md @@ -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 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 [redactions](#redactions) section below for a full overview. @@ -115,7 +125,8 @@ The rules are as follows: 3. If the `sender` is banned, reject. 4. If the `join_rule` is `invite` or `knock` then allow if 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. 2. If the `join_authorised_via_users_server` key in `content` 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. 3. Otherwise, reject. 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. 3. If the `sender`'s current membership is not `ban`, `invite`, or `join`, allow.