Add links to spam input in abuse report form
What does this MR do and why?
- Adds an input called
Link to Input
to the Abuse Report form. This is for users to give examples of links where the user being reported has done something abusive - The input field is optional, users can add multiple links, with a max of 20 links.
Screenshots or screen recordings
Screen_Recording_2023-01-02_at_6.11.27_pm
Database Migration
Output of db:migrate
main: == 20221229064959 AddLinksToSpamToAbuseReports: migrating =====================
main: -- transaction_open?()
main: -> 0.0000s
main: -- column_exists?(:abuse_reports, :links_to_spam)
main: -> 0.0199s
main: -- add_column(:abuse_reports, :links_to_spam, :text, {:array=>true, :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 abuse_reports_links_to_spam_length_check\nCHECK ( CARDINALITY(links_to_spam) <= 20 )\nNOT VALID;\n")
main: -> 0.0008s
main: -- current_schema()
main: -> 0.0003s
main: -- execute("SET statement_timeout TO 0")
main: -> 0.0004s
main: -- execute("ALTER TABLE abuse_reports VALIDATE CONSTRAINT abuse_reports_links_to_spam_length_check;")
main: -> 0.0005s
main: -- execute("RESET statement_timeout")
main: -> 0.0005s
main: == 20221229064959 AddLinksToSpamToAbuseReports: migrated (0.0405s) ============
Output of db:rollback
main: == 20221229064959 AddLinksToSpamToAbuseReports: reverting =====================
main: -- transaction_open?()
main: -> 0.0000s
main: -- column_exists?(:abuse_reports, :links_to_spam)
main: -> 0.0455s
main: -- remove_column(:abuse_reports, :links_to_spam)
main: -> 0.0011s
main: == 20221229064959 AddLinksToSpamToAbuseReports: reverted (0.0573s) ============
How to set up and validate locally
- Log-in as any user
- Go to another user's profile, such as
http://localhost:3000/maisha
- Click on
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.
Resolves https://gitlab.com/gitlab-org/modelops/anti-abuse/team-tasks/-/issues/132/
Edited by Hinam Mehra