summaryrefslogtreecommitdiff
path: root/app/mailers
diff options
context:
space:
mode:
author🙈 jacopo beschi 🙉 <intrip@gmail.com>2018-02-19 17:47:08 +0000
committerRémy Coutable <remy@rymai.me>2018-02-19 17:47:08 +0000
commit80090c8b06859ac23fec4b69c88a0e854ca2db8e (patch)
treed2384ac96dce71a9afc989c8e898a6b713a34f11 /app/mailers
parent9f06e3139803f0f20a0150bfe3ab13a06f2e3148 (diff)
downloadgitlab-ce-80090c8b06859ac23fec4b69c88a0e854ca2db8e.tar.gz
Resolve "group request membership mail with too long list of "To:""
Diffstat (limited to 'app/mailers')
-rw-r--r--app/mailers/emails/members.rb11
1 files changed, 2 insertions, 9 deletions
diff --git a/app/mailers/emails/members.rb b/app/mailers/emails/members.rb
index d76c61c369f..75cf56a51f2 100644
--- a/app/mailers/emails/members.rb
+++ b/app/mailers/emails/members.rb
@@ -7,18 +7,11 @@ module Emails
helper_method :member_source, :member
end
- def member_access_requested_email(member_source_type, member_id)
+ def member_access_requested_email(member_source_type, member_id, recipient_notification_email)
@member_source_type = member_source_type
@member_id = member_id
- admins = member_source.members.owners_and_masters.pluck(:notification_email)
- # A project in a group can have no explicit owners/masters, in that case
- # we fallbacks to the group's owners/masters.
- if admins.empty? && member_source.respond_to?(:group) && member_source.group
- admins = member_source.group.members.owners_and_masters.pluck(:notification_email)
- end
-
- mail(to: admins,
+ mail(to: recipient_notification_email,
subject: subject("Request to join the #{member_source.human_name} #{member_source.model_name.singular}"))
end