summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-03-23 17:09:45 +0000
committerAndrew Morgan <andrew@amorgan.xyz>2020-03-23 17:09:45 +0000
commit693425b4ea403eb046408d73fd697227e5f7de28 (patch)
tree6eda83a27007ddfa2ac4fd8109c2f073d691a65d /synapse/handlers
parentReduce amount of logging at INFO level. (#6862) (diff)
parentThird party event rules Update (#6781) (diff)
downloadsynapse-693425b4ea403eb046408d73fd697227e5f7de28.tar.xz
Third party event rules Update (#6781)
* commit '99fcc9628':
  Third party event rules Update (#6781)
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/room.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py
index b3b8fe7b82..ccf0e962f6 100644
--- a/synapse/handlers/room.py
+++ b/synapse/handlers/room.py
@@ -593,9 +593,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
+            )
 
         invite_list = config.get("invite", [])
         invite_3pid_list = config.get("invite_3pid", [])