diff options
author | PeerD <github@spy.de> | 2020-02-06 15:15:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-06 14:15:29 +0000 |
commit | 99fcc96289f673f96f2d180a84df84f6b8a85521 (patch) | |
tree | 6c586db0d6e4c57497f9b43c0a23b501bcc82a29 /synapse/handlers | |
parent | Reduce amount of logging at INFO level. (#6862) (diff) | |
download | synapse-99fcc96289f673f96f2d180a84df84f6b8a85521.tar.xz |
Third party event rules Update (#6781)
Diffstat (limited to 'synapse/handlers')
-rw-r--r-- | synapse/handlers/room.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py index 559e3399b8..ab07edd2fc 100644 --- a/synapse/handlers/room.py +++ b/synapse/handlers/room.py @@ -579,9 +579,13 @@ class RoomCreationHandler(BaseHandler): # Check whether the third party rules allows/changes the room create # request. - yield self.third_party_event_rules.on_create_room( + event_allowed = yield self.third_party_event_rules.on_create_room( requester, config, is_requester_admin=is_requester_admin ) + if not event_allowed: + raise SynapseError( + 403, "You are not permitted to create rooms", Codes.FORBIDDEN + ) if not is_requester_admin and not self.spam_checker.user_may_create_room( user_id |