From 15994c61a54c1010a7a422ce9e39ca04db422bdf Mon Sep 17 00:00:00 2001 From: Luca Becker Date: Tue, 16 Jul 2019 17:33:13 +0200 Subject: [PATCH] Clarification regarding authorisation rules The rules for m.room.power_levels power were somewhat unclear regarding the behaviour towards the always present keys, such as kick and ban. Additionally, it is now also clarified that in the users and events dictionary also added and removed keys are taken into consideration. --- specification/rooms/v1.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/specification/rooms/v1.rst b/specification/rooms/v1.rst index b5ef217a..ba25fa21 100644 --- a/specification/rooms/v1.rst +++ b/specification/rooms/v1.rst @@ -243,14 +243,15 @@ The rules are as follows: #. If there is no previous ``m.room.power_levels`` event in the room, allow. - #. For each of the keys ``users_default``, ``events_default``, - ``state_default``, ``ban``, ``redact``, ``kick``, ``invite``, as well as - each entry being changed under the ``events`` or ``users`` keys: + #. For the keys ``users_default``, ``events_default``, + ``state_default``, ``ban``, ``redact``, ``kick``, ``invite`` check if they were changed. + For each of the changed keys, as well as + each entry being added, changed or removed under the ``events`` or ``users`` keys: - i. If the current value is higher than the ``sender``'s current power level, + i. If the current value is present and higher than the ``sender``'s current power level, reject. - #. If the new value is higher than the ``sender``'s current power level, + #. If the new value is present and higher than the ``sender``'s current power level, reject. #. For each entry being changed under the ``users`` key, other than the