Skip to content

Abuse reports list MVC

Eugie Limpin requested to merge el-abuse-reports-list into master

What does this MR do and why?

This MR adds the foundation for an updated Abuse Reports list page. Changes here are behind abuse_reports_list feature flag.

In this iteration, the updated list implementation includes the same functionalities as the existing implementation except for report action1 buttons (Remove user & report, Block user, and Remove report). It includes:

  • pagination
  • filter by status (Open is used as the initial filter value by default)
  • filter by user

1 Bulk actions on the list will be implemented as part of https://gitlab.com/gitlab-org/modelops/anti-abuse/team-tasks/-/issues/161+ to replace the existing report action buttons.

What's next?

Succeeding MRs will build on top of this MR and will include the following enhancements:

  1. Filter by reporter
  2. Sorting: by created_at / updated_at
  3. Linking of each report to their respective details view

Screenshots or screen recordings

Before After
Screenshot_2023-03-03_at_8.59.43_AM Screenshot_2023-03-03_at_9.01.00_AM

How to set up and validate locally

  1. Enable the feature flag

    $ rails console
    > Feature.enable(:abuse_reports_list)
  2. Login with an admin account

  3. Go to the Abuse Reports page (http://localhost:3000/admin/abuse_reports)

  4. Validate that open (status = 'open') reports are shown and the filter component displays Status = Open

  5. Validate that the list can be filtered by status (open and closed)

    Close a report via Rails console by running AbuseReport.last.closed!

  6. Validate that the list can be filtered by user

  7. Validate that the list is paginated

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