Add reported from field to abuse report form
What does this MR do and why?
- Adds a
Reported From
field to the report abuse form which is supposed to contain the link to the issue/MR/user/comment that is being reported for abuse. - Updated the text & UI of the form based on the Figma design in the issue, https://gitlab.com/gitlab-org/modelops/anti-abuse/team-tasks/-/issues/132/
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 |
---|---|
after |
Validating the URL
How to set up and validate locally
- Log-in as admin
- Go to a user's profile, such as
http://localhost:3000/aubrey_schaefer
- Click on
Report abuse to administrator
- 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.
-
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