Skip to content

Limit abuse reports to one per reporter per category

Eugie Limpin requested to merge el-one-abuse-report-per-category into master

What does this MR do and why?

This MR implements https://gitlab.com/gitlab-org/modelops/anti-abuse/team-tasks/-/issues/181.

In !106028 (merged), we allowed multiple users to report an abusive user (only one user can report an abusive user in the past).

Now that we have categories for abuse reports (added in !105316 (merged)), this MR limits the reports a user can create to one per category.

Screenshots or screen recordings

Notice that the error is generic (You have already reported this user) and doesn't indicate the category. This is intentional (see discussion).

Screen_Recording_2023-01-10_at_10.56.04_AM

How to set up and validate locally

  1. Go to a user's profile page
  2. Report the user for spam
  3. Validate that the abuse report is created
  4. Go back to the user's profile page and report the user again for spam
  5. Validate that the error You have already reported this user is displayed
  6. Go back to the user's profile page and report the user using another category
  7. Validate that the abuse report is created

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