mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-07 21:52:36 -04:00
block event creation and room creation on hitting resource limits
This commit is contained in:
parent
b4d6db5c4a
commit
372bf073c1
2 changed files with 9 additions and 1 deletions
|
@ -98,9 +98,13 @@ class RoomCreationHandler(BaseHandler):
|
|||
Raises:
|
||||
SynapseError if the room ID couldn't be stored, or something went
|
||||
horribly wrong.
|
||||
ResourceLimitError if server is blocked to some resource being
|
||||
exceeded
|
||||
"""
|
||||
user_id = requester.user.to_string()
|
||||
|
||||
self.auth.check_auth_blocking(user_id)
|
||||
|
||||
if not self.spam_checker.user_may_create_room(user_id):
|
||||
raise SynapseError(403, "You are not permitted to create rooms")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue