warehouse icon indicating copy to clipboard operation
warehouse copied to clipboard

packaging: deletion window machinery

Open woodruffw opened this issue 1 year ago • 0 comments

This adds in_deletion_window to the File, Release, and Project models. The three models currently compose in deletion semantics as follows:

  1. A file is deletable iff it was uploaded within the last 7 days
  2. A release is deletable iff all of its files are deletable
  3. 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.

woodruffw avatar Sep 30 '24 17:09 woodruffw