Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add basic page to proceed/escalate held actions #22822

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

eviljeff
Copy link
Member

@eviljeff eviljeff commented Nov 5, 2024

Fixes: mozilla/addons#15075 (fixes mozilla/addons#15086 too)

Description

Adds a basic "review" page for decisions that have an action that hasn't taken place (i.e. held actions). For all decisions there should be a choice to go ahead with the decision, or to mark the content as okay (APPROVE) instead. Additionally, for add-on decisions that were made on a cinder job (e.g. all decisions from Cinder moderators) there is an option to forward (escalate) to the reviewer tools where other actions could be taken.

Screenshot 2024-11-05 175334

Context

The page is pretty bare-bones because there isn't much in the way of an agreed on spec (let alone UX), and a more complete tool will take too long - but we need to get something implemented so it doesn't block DSA-RE. (A more complete tool in AMO reviewer tools may be overtaken by new tooling elsewhere too). I expect there will be follow-up work to enhance the page.

Testing

Similar to #22788 you go through the full procedure with webhook payloads detailed in #22766, or you can fake it. To fake the decision instance in django shell:

  • ContentDecision.objects.create(action=DECISION_ACTIONS.AMO_DISABLE_ADDON, notes='some notes', addon_id=<an addon id you have locally>)
  • then with that instance decision.policies.add(<CinderPolicy instance>) (if you don't have any CinderPolicy instances, there's a button in django admin to sync some from Cinder.
  • The escalate/forward action needs a CinderJob associate with the decision. If you have one laying around in your db you can use that; otherwise CinderJob.objects.create(target_addon_id=<same addon id as decision>)

You can test Rating, Collection, and User similarly with a rating_id, and DECISION_ACTIONS.AMO_DELETE_RATING, etc (but no need to create a CinderJob, as there's no tool to forward those content types too anyway)

Checklist

  • Add #ISSUENUM at the top of your PR to an existing open issue in the mozilla/addons repository.
  • Successfully verified the change locally.
  • The change is covered by automated tests, or otherwise indicated why doing so is unnecessary/impossible.
  • Add before and after screenshots (Only for changes that impact the UI).
  • Add or update relevant docs reflecting the changes made.

@eviljeff eviljeff requested review from a team and KevinMind and removed request for a team November 5, 2024 15:01
@eviljeff eviljeff marked this pull request as ready for review November 5, 2024 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant