From 8b573c94895dc0ac0e1d9d59cf3e8745e8b539ca Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 17 Dec 2020 11:59:07 +0000 Subject: Add latest changes from gitlab-org/gitlab@13-7-stable-ee --- app/mailers/emails/issues.rb | 10 ++++++++++ app/mailers/emails/members.rb | 9 --------- app/mailers/emails/profile.rb | 8 ++++++++ app/mailers/emails/service_desk.rb | 2 +- 4 files changed, 19 insertions(+), 10 deletions(-) (limited to 'app/mailers') diff --git a/app/mailers/emails/issues.rb b/app/mailers/emails/issues.rb index 10a1da90e9e..b2c1351bd28 100644 --- a/app/mailers/emails/issues.rb +++ b/app/mailers/emails/issues.rb @@ -80,6 +80,16 @@ module Emails mail_answer_thread(issue, issue_thread_options(updated_by_user.id, recipient.id, reason)) end + def issue_cloned_email(recipient, issue, new_issue, updated_by_user, reason = nil) + setup_issue_mail(issue.id, recipient.id) + + @author = updated_by_user + @issue = issue + @new_issue = new_issue + @can_access_project = recipient.can?(:read_project, @new_issue.project) + mail_answer_thread(issue, issue_thread_options(updated_by_user.id, recipient.id, reason)) + end + def import_issues_csv_email(user_id, project_id, results) @user = User.find(user_id) @project = Project.find(project_id) diff --git a/app/mailers/emails/members.rb b/app/mailers/emails/members.rb index 0b5a8dfdc24..759181bd3cb 100644 --- a/app/mailers/emails/members.rb +++ b/app/mailers/emails/members.rb @@ -63,15 +63,6 @@ module Emails subject: subject_line, layout: 'unknown_user_mailer' ) - - if Gitlab::Experimentation.enabled?(:invitation_reminders) - Gitlab::Tracking.event( - Gitlab::Experimentation.experiment(:invitation_reminders).tracking_category, - 'sent', - property: Gitlab::Experimentation.enabled_for_attribute?(:invitation_reminders, member.invite_email) ? 'experimental_group' : 'control_group', - label: Digest::MD5.hexdigest(member.to_global_id.to_s) - ) - end end def member_invited_reminder_email(member_source_type, member_id, token, reminder_index) diff --git a/app/mailers/emails/profile.rb b/app/mailers/emails/profile.rb index 6f44b63f8d0..e3c72a343e7 100644 --- a/app/mailers/emails/profile.rb +++ b/app/mailers/emails/profile.rb @@ -18,6 +18,14 @@ module Emails subject: subject(_("GitLab Account Request"))) end + def user_admin_rejection_email(name, email) + @name = name + + profile_email_with_layout( + to: email, + subject: subject(_("GitLab account request rejected"))) + end + # rubocop: disable CodeReuse/ActiveRecord def new_ssh_key_email(key_id) @key = Key.find_by(id: key_id) diff --git a/app/mailers/emails/service_desk.rb b/app/mailers/emails/service_desk.rb index fa646487819..4dceff5b7ba 100644 --- a/app/mailers/emails/service_desk.rb +++ b/app/mailers/emails/service_desk.rb @@ -47,7 +47,7 @@ module Emails def service_desk_options(email_sender, email_type) { from: email_sender, - to: @issue.service_desk_reply_to + to: @issue.external_author }.tap do |options| next unless template_body = template_content(email_type) -- cgit v1.2.1