diff options
author | Go MAEDA <maeda@farend.jp> | 2023-03-26 05:20:29 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2023-03-26 05:20:29 +0000 |
commit | 260ba2e04a02945f24068fe3402cf0b838b74d63 (patch) | |
tree | 32d5a9ce40f8325a5ccb63de4acdd5cf30adec97 /app | |
parent | 79f0c64e29791b7b4084e1c35c3a889be7ff06ba (diff) | |
download | redmine-260ba2e04a02945f24068fe3402cf0b838b74d63.tar.gz redmine-260ba2e04a02945f24068fe3402cf0b838b74d63.zip |
Add LockedTopic exception to MailHandler (#38273).
Patch by Felix Schäfer.
git-svn-id: https://svn.redmine.org/redmine/trunk@22159 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/models/mail_handler.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/mail_handler.rb b/app/models/mail_handler.rb index 738feb30e..8a4084769 100644 --- a/app/models/mail_handler.rb +++ b/app/models/mail_handler.rb @@ -24,6 +24,7 @@ class MailHandler < ActionMailer::Base class UnauthorizedAction < StandardError; end class NotAllowedInProject < UnauthorizedAction; end class InsufficientPermissions < UnauthorizedAction; end + class LockedTopic < UnauthorizedAction; end class MissingInformation < StandardError; end class MissingContainer < StandardError; end @@ -301,7 +302,7 @@ class MailHandler < ActionMailer::Base add_attachments(reply) reply else - logger&.info "MailHandler: ignoring reply from [#{email.from.first}] to a locked topic" + raise LockedTopic, "ignoring reply to a locked message [#{message.id} #{message.subject}]" end end |