diff options
author | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 22:34:23 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 22:34:23 +0300 |
commit | 6438df3a1e0fb944485cebf07976160184697d72 (patch) | |
tree | 00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /app/mailers/emails/members.rb | |
parent | 42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff) |
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'app/mailers/emails/members.rb')
-rw-r--r-- | app/mailers/emails/members.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/app/mailers/emails/members.rb b/app/mailers/emails/members.rb index 759181bd3cb..69f5fe1430a 100644 --- a/app/mailers/emails/members.rb +++ b/app/mailers/emails/members.rb @@ -114,6 +114,23 @@ module Emails subject: subject('Invitation declined')) end + def member_expiration_date_updated_email(member_source_type, member_id) + @member_source_type = member_source_type + @member_id = member_id + + return unless member_exists? + + subject = if member.expires? + _('Group membership expiration date changed') + else + _('Group membership expiration date removed') + end + + member_email_with_layout( + to: member.user.notification_email_for(notification_group), + subject: subject(subject)) + end + # rubocop: disable CodeReuse/ActiveRecord def member @member ||= Member.find_by(id: @member_id) @@ -147,3 +164,5 @@ module Emails end end end + +Emails::Members.prepend_if_ee('EE::Emails::Members') |