diff options
Diffstat (limited to 'app/mailers')
-rw-r--r-- | app/mailers/abuse_report_mailer.rb | 4 | ||||
-rw-r--r-- | app/mailers/emails/admin_notification.rb | 20 | ||||
-rw-r--r-- | app/mailers/emails/merge_requests.rb | 7 | ||||
-rw-r--r-- | app/mailers/emails/projects.rb | 6 |
4 files changed, 7 insertions, 30 deletions
diff --git a/app/mailers/abuse_report_mailer.rb b/app/mailers/abuse_report_mailer.rb index 20aabb6fe58..1fa85064c57 100644 --- a/app/mailers/abuse_report_mailer.rb +++ b/app/mailers/abuse_report_mailer.rb @@ -11,8 +11,8 @@ class AbuseReportMailer < ApplicationMailer @abuse_report = AbuseReport.find(abuse_report_id) mail( - to: Gitlab::CurrentSettings.abuse_notification_email, - subject: "#{@abuse_report.user.name} (#{@abuse_report.user.username}) was reported for abuse" + to: Gitlab::CurrentSettings.abuse_notification_email, + subject: "#{@abuse_report.user.name} (#{@abuse_report.user.username}) was reported for abuse" ) end diff --git a/app/mailers/emails/admin_notification.rb b/app/mailers/emails/admin_notification.rb index 9d02d4132a1..3766b4447d1 100644 --- a/app/mailers/emails/admin_notification.rb +++ b/app/mailers/emails/admin_notification.rb @@ -15,23 +15,7 @@ module Emails email = user.notification_email_or_default mail to: email, subject: "Unsubscribed from GitLab administrator notifications" end - - def user_auto_banned_email(admin_id, user_id, max_project_downloads:, within_seconds:, group: nil) - admin = User.find(admin_id) - @user = User.find(user_id) - @max_project_downloads = max_project_downloads - @within_minutes = within_seconds / 60 - @ban_scope = if group.present? - _('your group (%{group_name})' % { group_name: group.name }) - else - _('your GitLab instance') - end - - Gitlab::I18n.with_locale(admin.preferred_language) do - email_with_layout( - to: admin.notification_email_or_default, - subject: subject(_("We've detected unusual activity"))) - end - end end end + +Emails::AdminNotification.prepend_mod diff --git a/app/mailers/emails/merge_requests.rb b/app/mailers/emails/merge_requests.rb index 6a2b447f4a0..fc944c34166 100644 --- a/app/mailers/emails/merge_requests.rb +++ b/app/mailers/emails/merge_requests.rb @@ -104,13 +104,6 @@ module Emails mail_answer_thread(@merge_request, merge_request_thread_options(updated_by_user_id, reason)) end - def attention_requested_merge_request_email(recipient_id, merge_request_id, updated_by_user_id, reason = nil) - setup_merge_request_mail(merge_request_id, recipient_id) - - @updated_by = User.find(updated_by_user_id) - mail_answer_thread(@merge_request, merge_request_thread_options(updated_by_user_id, reason)) - end - def merge_request_status_email(recipient_id, merge_request_id, status, updated_by_user_id, reason = nil) setup_merge_request_mail(merge_request_id, recipient_id) diff --git a/app/mailers/emails/projects.rb b/app/mailers/emails/projects.rb index ed3fa28b15f..5b8471abb0f 100644 --- a/app/mailers/emails/projects.rb +++ b/app/mailers/emails/projects.rb @@ -51,9 +51,9 @@ module Emails add_project_headers headers['X-GitLab-Author'] = @message.author_username - mail(from: sender(@message.author_id, send_from_user_email: @message.send_from_committer_email?), - reply_to: @message.reply_to, - subject: @message.subject) + mail(from: sender(@message.author_id, send_from_user_email: @message.send_from_committer_email?), + reply_to: @message.reply_to, + subject: @message.subject) end def prometheus_alert_fired_email(project, user, alert) |