diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-14 12:08:19 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-14 12:08:19 +0300 |
commit | 02ab65d49fc94be7c91e511899762236c122977d (patch) | |
tree | 4d4bf4ec54a95a0d73e039fa1410ea841156ffb2 /lib/gitlab/email/handler/reply_processing.rb | |
parent | 4411353300cf8219d2b899785bc5103c549ba8cf (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/email/handler/reply_processing.rb')
-rw-r--r-- | lib/gitlab/email/handler/reply_processing.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/gitlab/email/handler/reply_processing.rb b/lib/gitlab/email/handler/reply_processing.rb index 6b7686cd405..312a9fdfbae 100644 --- a/lib/gitlab/email/handler/reply_processing.rb +++ b/lib/gitlab/email/handler/reply_processing.rb @@ -41,13 +41,20 @@ module Gitlab end def add_attachments(reply) - attachments = Email::AttachmentUploader.new(mail).execute(project) + attachments = Email::AttachmentUploader.new(mail).execute(upload_params) reply + attachments.map do |link| "\n\n#{link[:markdown]}" end.join end + def upload_params + { + upload_parent: project, + uploader_class: FileUploader + } + end + def validate_permission!(permission) raise UserNotFoundError unless author raise UserBlockedError if author.blocked? |