Skip to content

[Task]: Add new illegal_category field in abuse reports #14870

@willdurand

Description

@willdurand

As part of https://mozilla-hub.atlassian.net/browse/AMOENG-683, we need to add a new illegal_category field in the feedback form. The first step is to make it available in the API, which this issue is about.

The possible values for this new fields are:

  • Animal welfare
  • Consumer information infringements
  • Data protection and privacy violations
  • Illegal or harmful speech
  • Intellectual property infringements
  • Negative effects on civic discourse or elections
  • Non-consensual behavior
  • Pornography or sexualized content
  • Protection of minors
  • Risk for public security
  • Scams or fraud
  • Self-harm
  • Unsafe, non-compliant, or prohibited products
  • Violence
  • Other

Though, we'll want to have constants in the API.

This new field should be sent to Cinder, in the illegal_category field of the AMO Report entity. Each value sent should be normalized to look like one of the following:

  • STATEMENT_CATEGORY_ANIMAL_WELFARE
  • STATEMENT_CATEGORY_CONSUMER_INFORMATION
  • STATEMENT_CATEGORY_DATA_PROTECTION_AND_PRIVACY_VIOLATIONS
  • STATEMENT_CATEGORY_ILLEGAL_OR_HARMFUL_SPEECH
  • STATEMENT_CATEGORY_INTELLECTUAL_PROPERTY_INFRINGEMENTS
  • STATEMENT_CATEGORY_NEGATIVE_EFFECTS_ON_CIVIC_DISCOURSE_OR_ELECTIONS
  • STATEMENT_CATEGORY_NON_CONSENSUAL_BEHAVIOUR
  • STATEMENT_CATEGORY_PORNOGRAPHY_OR_SEXUALIZED_CONTENT
  • STATEMENT_CATEGORY_PROTECTION_OF_MINORS
  • STATEMENT_CATEGORY_RISK_FOR_PUBLIC_SECURITY
  • STATEMENT_CATEGORY_SCAMS_AND_FRAUD
  • STATEMENT_CATEGORY_SELF_HARM
  • STATEMENT_CATEGORY_UNSAFE_AND_PROHIBITED_PRODUCTS
  • STATEMENT_CATEGORY_VIOLENCE
  • STATEMENT_CATEGORY_OTHER

Now given that we won't have the frontend work done yet, the only way to send this new field is to use the API directly, e.g. with HTTPie:

 http --json POST 'https://addons-dev.allizom.org/api/v5/abuse/report/user/?lang=en-US' --raw '{"user":12345,"message":"test","reason":"illegal","reporter_email":null,"reporter_name":null,"lang":"en-US","illegal_category":"animal_welfare"}'

┆Issue is synchronized with this Jira Task

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions