From ccd00df71ca30e8f10c8642b7a16763a6e19f6f2 Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Thu, 22 Apr 2021 03:07:42 +0000 Subject: MailHandler raises NameError exception when generating error message (#35100). Patch by Dmitry Makurin and Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@20959 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/mail_handler.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/models/mail_handler.rb b/app/models/mail_handler.rb index 0fd7f10af..102cd8b75 100644 --- a/app/models/mail_handler.rb +++ b/app/models/mail_handler.rb @@ -227,7 +227,7 @@ class MailHandler < ActionMailer::Base unless handler_options[:no_permission_check] unless user.allowed_to?(:add_issue_notes, issue.project) || user.allowed_to?(:edit_issues, issue.project) - raise UnauthorizedAction, "not allowed to add notes on issues to project [#{project.name}]" + raise UnauthorizedAction, "not allowed to add notes on issues to project [#{issue.project.name}]" end end @@ -276,7 +276,7 @@ class MailHandler < ActionMailer::Base end unless handler_options[:no_permission_check] - raise UnauthorizedAction, "not allowed to add messages to project [#{project.name}]" unless user.allowed_to?(:add_messages, message.project) + raise UnauthorizedAction, "not allowed to add messages to project [#{message.project.name}]" unless user.allowed_to?(:add_messages, message.project) end if !message.locked? -- cgit v1.2.3