add support for Approve marking listing content as approved #24366
+140
−45
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#15984
Description
Expands the Approve action to do as the naming implies, to approve the listing content (for add-ons). If the add-on is STATUS_REJECTED, approving the content will restore the addon status too (and send an email to the developer informing them).
Context
Even though for content review there won't usually be any abuse reports resolved, the code (and tests) are written to support resolving an abuse report at the same time (which might be useful for mozilla/addons#15969)
Testing
Similar to #24308, this is mainly expected to be used with content review in Cinder, but that doesn't exist yet - though the Approve policy does exist already - so easiest way is to use the abuse report flow:
For content review where the add-on isn't rejected (normal case):
AddonApprovalsCounterinstance)Then for content review where the add-on is rejected (i.e. the developer requested another review):
AddonApprovalsCountersolast_content_review_pass = Falseand the status isSTATUS_REJECTEDChecklist
#ISSUENUMat the top of your PR to an existing open issue in the mozilla/addons repository.