From ec5291c0c82b421b1b2e1fc50f3b9705a3d3a3b5 Mon Sep 17 00:00:00 2001 From: Mikaela Suomalainen Date: Tue, 23 Nov 2021 12:32:11 +0200 Subject: [PATCH] m.room.power_levels: rewrite other than users {} Resolves: #27 --- matrix/m.room.power_levels/README.md | 90 +++++++++++++++++++--------- 1 file changed, 63 insertions(+), 27 deletions(-) diff --git a/matrix/m.room.power_levels/README.md b/matrix/m.room.power_levels/README.md index 90655ba..b549387 100644 --- a/matrix/m.room.power_levels/README.md +++ b/matrix/m.room.power_levels/README.md @@ -21,36 +21,72 @@ The main point I do this for is users `users` }, ``` -but here is `events` just in case. Please don't copy-paste directly, that may -break things: +## Completeish event + +This has the rest event in two forms, but doesn't duplicate the above. + +### Reasonable version + +This is not the Element/Synapse default as that would be pointless to list. ```json { - "type": "m.room.power_levels", - "content": { - "invite": 100, - "events": { - "m.room.avatar": 100, - "im.vector.modular.widgets": 100, - "m.room.history_visibility": 100, - "m.room.name": 100, - "m.room.encryption": 100, - "m.room.tombstone": 100, - "m.room.canonical_alias": 100, - "m.room.power_levels": 49, - "m.room.topic": 100, - "m.room.retention": 100 - }, - "redact": 50, - "ban": 50, - "kick": 50, - "users_default": 0, - "events_default": 0, - "state_default": 50 - }, + "ban": 50, + "events": { + "im.vector.modular.widgets": 50, + "m.room.avatar": 50, + "m.room.canonical_alias": 50, + "m.room.encryption": 100, + "m.room.history_visibility": 99, + "m.room.name": 50, + "m.room.power_levels": 99, + "m.room.retention": 100, + "m.room.server_acl": 100, + "m.room.tombstone": 100, + "m.room.topic": 50, + "m.space.child": 50 + }, + "events_default": 0, + "historical": 100, + "invite": 0, + "kick": 50, + "redact": 50, + "state_default": 50, + "users": { + READ THE BEGINNING OF THE FILE FOR THIS SECTION AND PROPER FORMAT! OR SEE YOUR CURRENT EVENT! + }, + "users_default": 0 } ``` -* If `m.room.power_levels` event is 49, moderators (PL50) are able to raise - other users to moderators while sharing equal power they won't be able to - demote. +### Paranoid version + +```json +{ + "ban": 50, + "events": { + "im.vector.modular.widgets": 100, + "m.room.avatar": 100, + "m.room.canonical_alias": 100, + "m.room.encryption": 100, + "m.room.history_visibility": 100, + "m.room.name": 100, + "m.room.power_levels": 100, + "m.room.retention": 100, + "m.room.server_acl": 100, + "m.room.tombstone": 100, + "m.room.topic": 100, + "m.space.child": 100 + }, + "events_default": 0, + "historical": 100, + "invite": 100, + "kick": 50, + "redact": 50, + "state_default": 100, + "users": { + READ THE BEGINNING OF THE FILE FOR THIS SECTION AND PROPER FORMAT! OR SEE YOUR CURRENT EVENT! + }, + "users_default": 0 +} +```