Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/mailers/emails/admin_notification.rb')
-rw-r--r--app/mailers/emails/admin_notification.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/mailers/emails/admin_notification.rb b/app/mailers/emails/admin_notification.rb
index f44dd448a35..9d02d4132a1 100644
--- a/app/mailers/emails/admin_notification.rb
+++ b/app/mailers/emails/admin_notification.rb
@@ -16,11 +16,16 @@ module Emails
mail to: email, subject: "Unsubscribed from GitLab administrator notifications"
end
- def user_auto_banned_email(admin_id, user_id, max_project_downloads:, within_seconds:)
+ 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(