Commit 68b5ded0 authored by Lin Jen-Shin's avatar Lin Jen-Shin

No need to check project because:

sent_notification.project would never be nil, and
we also have already checked message_project before
entering process_create_issue.
parent 034e752a
...@@ -79,8 +79,7 @@ module Gitlab ...@@ -79,8 +79,7 @@ module Gitlab
raise UserNotFoundError unless author raise UserNotFoundError unless author
raise UserBlockedError if author.blocked? raise UserBlockedError if author.blocked?
# TODO: Give project not found error if author cannot read project # TODO: Give project not found error if author cannot read project
raise UserNotAuthorizedError if project.nil? || raise UserNotAuthorizedError unless author.can?(permission, project)
!author.can?(permission, project)
end end
# Find the first matched user in database from email From: section # Find the first matched user in database from email From: section
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment