Skip to content

Database and API for Git abuse rate limiting alerted users

What does this MR do and why?

This MR adds the database and api part for the alerted users feature for Git abuse rate limiting.

MR's for this feature (in order of dependency):

Issue: https://gitlab.com/gitlab-org/modelops/anti-abuse/team-tasks/-/issues/186+

Screenshots or screen recordings

Admin settings Group settings
Before Screenshot_2023-02-02_at_17.52.22 Screenshot_2023-02-02_at_17.52.57
After Screenshot_2023-02-02_at_17.53.54 Screenshot_2023-02-02_at_17.54.25

How to set up and validate locally

  1. Cherry pick all commits from the MR's mentioned in the description (alternatively, checkout the add-alerted-users-to-git-abuse-rate-limiting branch, which has them all)
  2. Enable the feature flag
    Feature.enable(:git_abuse_rate_limit_feature_flag)
  3. Visit the Git abuse rate limit admin settings: http://localhost:3000/admin/application_settings/reporting
  4. Add and/or remove users from Send notifications to field
  5. Click Save changes
  6. Visit the Git abuse rate limit group settings: http://localhost:3000/groups/${group_name}/-/settings/reporting
  7. Add and/or remove users from Send notifications to field
  8. Click Save changes

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 Alex Buijs

Merge request reports