diff options
author | Andrew Morgan <andrew@amorgan.xyz> | 2020-03-23 18:01:36 +0000 |
---|---|---|
committer | Andrew Morgan <andrew@amorgan.xyz> | 2020-03-23 18:01:36 +0000 |
commit | ed2f00559f946f1539f16ebd93ed592327417dce (patch) | |
tree | 43cc2491d4ee1dda42aa9990f7d7e374ae8ed417 /synapse/handlers | |
parent | wait for current_state_events_membership before delete_old_current_state_even... (diff) | |
parent | Raise the default power levels for invites, tombstones and server acls (#6834) (diff) | |
download | synapse-ed2f00559f946f1539f16ebd93ed592327417dce.tar.xz |
Raise the default power levels for invites, tombstones and server acls (#6834)
* commit '3404ad289': Raise the default power levels for invites, tombstones and server acls (#6834)
Diffstat (limited to 'synapse/handlers')
-rw-r--r-- | synapse/handlers/room.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py index ccf0e962f6..ad7eac7dc8 100644 --- a/synapse/handlers/room.py +++ b/synapse/handlers/room.py @@ -65,6 +65,7 @@ class RoomCreationHandler(BaseHandler): "original_invitees_have_ops": False, "guest_can_join": True, "encryption_alg": "m.megolm.v1.aes-sha2", + "power_level_content_override": {"invite": 0}, }, RoomCreationPreset.TRUSTED_PRIVATE_CHAT: { "join_rules": JoinRules.INVITE, @@ -72,12 +73,14 @@ class RoomCreationHandler(BaseHandler): "original_invitees_have_ops": True, "guest_can_join": True, "encryption_alg": "m.megolm.v1.aes-sha2", + "power_level_content_override": {"invite": 0}, }, RoomCreationPreset.PUBLIC_CHAT: { "join_rules": JoinRules.PUBLIC, "history_visibility": "shared", "original_invitees_have_ops": False, "guest_can_join": False, + "power_level_content_override": {}, }, } @@ -849,19 +852,24 @@ class RoomCreationHandler(BaseHandler): # This will be reudundant on pre-MSC2260 rooms, since the # aliases event is special-cased. EventTypes.Aliases: 0, + EventTypes.Tombstone: 100, + EventTypes.ServerACL: 100, }, "events_default": 0, "state_default": 50, "ban": 50, "kick": 50, "redact": 50, - "invite": 0, + "invite": 50, } if config["original_invitees_have_ops"]: for invitee in invite_list: power_level_content["users"][invitee] = 100 + # Power levels overrides are defined per chat preset + power_level_content.update(config["power_level_content_override"]) + if power_level_content_override: power_level_content.update(power_level_content_override) |