Skip to content

Add reported from field to abuse report form

What does this MR do and why?

Database Migration

- Output of db:migrate

main: == 20221212054640 AddReportedFromToAbuseReports: migrating ====================
main: -- transaction_open?()
main:    -> 0.0000s
main: -- column_exists?(:abuse_reports, :reported_from_url)
main:    -> 0.0208s
main: -- add_column(:abuse_reports, :reported_from_url, :text, {:null=>false, :default=>""})
main:    -> 0.0015s
main: -- transaction_open?()
main:    -> 0.0000s
main: -- current_schema()
main:    -> 0.0003s
main: -- transaction_open?()
main:    -> 0.0000s
main: -- execute("ALTER TABLE abuse_reports\nADD CONSTRAINT check_ab1260fa6c\nCHECK ( char_length(reported_from_url) <= 512 )\nNOT VALID;\n")
main:    -> 0.0009s
main: -- current_schema()
main:    -> 0.0003s
main: -- execute("SET statement_timeout TO 0")
main:    -> 0.0004s
main: -- execute("ALTER TABLE abuse_reports VALIDATE CONSTRAINT check_ab1260fa6c;")
main:    -> 0.0006s
main: -- execute("RESET statement_timeout")
main:    -> 0.0004s
main: == 20221212054640 AddReportedFromToAbuseReports: migrated (0.0422s) ===========

- Output of db:rollback

main: == 20221212054640 AddReportedFromToAbuseReports: reverting ====================
main: -- transaction_open?()
main:    -> 0.0000s
main: -- column_exists?(:abuse_reports, :reported_from_url)
main:    -> 0.0121s
main: -- remove_column(:abuse_reports, :reported_from_url)
main:    -> 0.0013s
main: == 20221212054640 AddReportedFromToAbuseReports: reverted (0.0314s) ===========

Screenshots or screen recordings

Before After
before after

Validating the URL

How to set up and validate locally

  1. Log-in as admin
  2. Go to a user's profile, such as http://localhost:3000/aubrey_schaefer
  3. Click on Report abuse to administrator
  4. You can also go to an issue created by another user and click on Issue Actions -> Report abuse to administrator

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

Loading