Skip to content

Update user_auto_banned_email to scope the email to a group

Eugie Limpin requested to merge limit_unique_project_downloads_notif into master

What does this MR do and why?

Update user_auto_banned_email to accept a group where the ban is enforced. This grouped-scoped email will be sent to group owners when a user is auto-banned due to excessive project downloads.

This implements https://gitlab.com/gitlab-org/modelops/anti-abuse/team-tasks/-/issues/35 as part of https://gitlab.com/groups/gitlab-org/modelops/anti-abuse/-/epics/1.

Out of scope

The links to unban and configure settings will be updated in https://gitlab.com/gitlab-org/modelops/anti-abuse/team-tasks/-/issues/46 as these links are dependent on !89996 (merged) which is not in master yet.

Screenshots or screen recordings

Without passing in a group (ban is instance-wide) When passing in a group (ban is namespace-wide)
Screen_Shot_2022-06-30_at_1.44.59_PM Screen_Shot_2022-06-30_at_1.46.02_PM

How to set up and validate locally

  1. Start your GDK
  2. Visit the email preview URL: http://localhost:3000/rails/mailers/notify/user_auto_banned_namespace_email

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Eugie Limpin

Merge request reports