Skip to content

Support filtering abuse reports list by reporter

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

This MR requires Update AbuseReportFinder to allow filtering by ... (!113649 - merged)

What does this MR do and why?

This MR implements Implement filter by reporter as part of https://gitlab.com/gitlab-org/modelops/anti-abuse/team-tasks/-/issues/157+.

It updates the abuse reports list to allow filtering displayed reports by reporter.

Screenshots or screen recordings

Screen_Recording_2023-03-09_at_3.57.35_PM

How to set up and validate locally

  1. Enable the feature flag

    $ rails console
    > Feature.enable(:abuse_reports_list)
  2. Update an existing abuse report to have a specific reporter that we can use for validation

    $ rails console
    
    > report = AbuseReport.last
    > reporter = User.find(2)
    
    # print our reporter’s username
    # Take note of the actual output here. We’ll use that in step 3
    > reporter.username
    => “reporter_username” # sample output
    
    # update the reports’ reporter
    > report.reporter = reporter
    > report.save
  3. Login with an admin account

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

  5. Validate that the list can be filtered by reporter (you should see the report you updated in step 2)

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