add basic page to proceed/escalate held actions #22822
Open
+374
−74
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
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>)
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.CinderJob.objects.create(target_addon_id=<same addon id as decision>)
You can test Rating, Collection, and User similarly with a
rating_id
, andDECISION_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
#ISSUENUM
at the top of your PR to an existing open issue in the mozilla/addons repository.