addons-server icon indicating copy to clipboard operation
addons-server copied to clipboard

Log when an admin deletes/undeletes a collection through the admin

Open diox opened this issue 9 months ago • 0 comments

Also avoid showing deleted field if the collection isn't already deleted - that's pointless and confusing, admins should use the regular delete action if they want to delete something.

Fixes https://github.com/mozilla/addons/issues/15394

Testing

  • As an admin (needs Collections:Edit permission + access to the admin, or just *:*) look at a non-deleted collection detail page in the admin
  • Deleted field should be absent
  • Delete that collection through the button
  • Collection should now be deleted - can't see it in frontend
  • An ActivityLog with COLLECTION_DELETED action and the collection as argument should have been recorded in the database
  • Go back to that collection admin detail page
  • Slug field should not have changed (it would if the user would have deleted the collection themselves through the frontend)
  • Deleted field should be present and ticked
  • Untick Deleted field and hit save
  • An ActivityLog with COLLECTION_UNDELETED action and the collection as argument should have been recorded in the database
  • Collection should now be undeleted - can see it in frontend

diox avatar Mar 26 '25 13:03 diox