Page MenuHomePhabricator

Reflect on how deleted tools should be handled and displayed in the UI
Open, Needs TriagePublic

Description

When a tool is deleted, it can no longer be linked to from e.g. audit logs, or revisions of lists that contained that tool in the past.

Ideally, we would like to display some info about when and by whom the tool was deleted, similar to how deleted pages are handled in MediaWiki, as opposed to silently disappearing the tool from all public records, authoritarian dictatorship style.

On the backend, deleting a tool doesn't remove it from the database. Rather, it is a soft delete that can be undone if needed, meaning that all info associated with the tool is still available.

We need to figure out the best way to expose data about a deleted tool through the API, and how to best display it in the UI.

Event Timeline

I've been wondering if we should change our API endpoints so that instead of a 404 status we return a 410 status when we can figure out that there once was a tool or list with the requested id. This would be possible because of our use of django-safedelete to "soft delete" these models. We would have to do something custom in the DRF views to make this work, but it might be a reasonable way to handle this issue as we could return a custom response body with the 410 status as well.