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 theabuse_reports
table, and anenum
in the model. - Create a
AbuseCategorySelector
form and theReportAbuseButton
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 withuser_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
- Navigate to a user's profile, such as
http://localhost:3000/cherryl
- Click on the
Report abuse to administrator
button on the upper right-hand corner - Select a category and click on
Next
. You will be redirected to theReport abuse
form. - 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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to https://gitlab.com/gitlab-org/modelops/anti-abuse/team-tasks/-/issues/132/
Edited by Hinam Mehra