warehouse
warehouse copied to clipboard
packaging: deletion window machinery
This adds in_deletion_window to the File, Release, and Project models. The three models currently compose in deletion semantics as follows:
- A file is deletable iff it was uploaded within the last 7 days
- A release is deletable iff all of its files are deletable
- A project is deletable iff all of its releases are deletable
This results in no special casing: the deletability of releases and projects is entirely "driven" by the deletability of files, as files are the primary way in which users drive the creation of releases and projects.
This PR does not connect the deletion semantics to actual UI or view changes; I'll do that in a follow-up, to keep the patches small.