diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-27 15:10:44 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-27 15:10:44 +0300 |
commit | a4068557f4e8f0622798ccf824ac314e2008a57b (patch) | |
tree | a3ddbb6c902828009c0e02813339abe88cae9d60 /app/mailers | |
parent | d0a683e342c9e59bec8bb83879f0fc959b79224e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/mailers')
-rw-r--r-- | app/mailers/emails/admin_notification.rb | 20 |
1 files changed, 2 insertions, 18 deletions
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 |