addons
addons copied to clipboard
[Task]: Add logging in django admin when deleting collections
Description
When an admin deletes a collection through the django admin, we should emit a COLLECTION_DELETED activity log like we do when it comes from Cinder.
Ideally, we should even use the same ContentActionDeleteCollection code, which handles holding off the action for 2nd approval, offering possibility of appeal to the author, etc, but because the action is not coming from Cinder that could be more involved and might need to be split into a different ticket.
Acceptance Criteria
### Milestones/checkpoints
- [ ] Collections deleted through the admin emit `COLLECTION_DELETED` activity log
Checks
- [x] If I have identified that the work is specific to a repository, I have removed "repository:addons-server" or "repository:addons-frontend"
┆Issue is synchronized with this Jira Task
using ContentActionDeleteCollection would need us to start on https://mozilla-hub.atlassian.net/browse/AOP-460 - the major pieces of work are:
- the ability to select a policy and/or notes to justify the takedown when the decision to deletion the collection is taken
- a way to be aware of, and process, any appeals to those decisions
https://github.com/mozilla/addons/issues/15407 was filed for the work related to using ContentActionDeleteCollection , we can focus on just emitting the activity log in the meantime so that we have proper records.
@diox
I tested the str on dev and looks good.
I thought of trying to take down a collection from Cinder and noticed that atm that's not working on dev or stage , for collections, ratings or extensions.
STR would be:
- sending the report to Cinder
- choosing a policy that disables content
But none of the attempts were successful, I've no emails sent either. (marking this verified since it's unrelated)