Add abuse categories to abuse reports list
What does this MR do and why?
- Adds the abuse category to the abuse reports list, as per the design in https://gitlab.com/gitlab-org/modelops/anti-abuse/team-tasks/-/issues/157
- Colours for the different abuse categories wasn't specified in the design, so I have chosen the colours myself for now. In the future, admins will be able to configure the colours themselves.
Screenshots or screen recordings
before | after |
---|---|
How to set up and validate locally
- Enable feature flag and create abuse reports with different categories
> Feature.enable(:abuse_reports_list)
> AbuseReport.categories.each { |k, v| AbuseReport.create(user: User.last, reporter: User.first, message: "test", category: k, reported_from_url: "http://127.0.0.1:3000/gitlab-org/gitlab-test/-/issues/37")}
- Log-in as admin and navigate to abuse reports -
http://127.0.0.1:3000/admin/abuse_reports
.
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.
Edited by Hinam Mehra