Skip to content

Add abuse category to report abuse form

What does this MR do and why?

When a user wants to report another user from their profile, we will now ask them to select a category of abuse and then redirect them to the existing report abuse form. As part of that, this MR:

  • Creates a category column in the abuse_reports table, and an enum in the model.
  • Create a AbuseCategorySelector form and the ReportAbuseButton in Vue.
  • Since the category selector and the report abuse form are on 2 different pages, the category selector sends a POST request to the method new_with_category which renders the existing form with user_id, ref_url and category.
  • The data is collectively saved in the DB.

Screenshots or screen recordings

Screen_Recording_2022-12-06_at_1.50.46_pm

How to set up and validate locally

  1. Navigate to a user's profile, such as http://localhost:3000/cherryl
  2. Click on the Report abuse to administrator button on the upper right-hand corner
  3. Select a category and click on Next. You will be redirected to the Report abuse form.
  4. Add any additional details in the message box and click on Send report.

MR acceptance checklist

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

Related to https://gitlab.com/gitlab-org/modelops/anti-abuse/team-tasks/-/issues/132/

Edited by Hinam Mehra

Merge request reports