"Owning entity" of repository file
For purposes of automatic cleanup (deleting files from repository) and permission management we need to somehow record what entity "owns" the repository entry.
- Adding a file must require specifying its owning entity and when that entity is removed, we should also remove the files associated with it.
- The owning entity, when an instance of
AclEntity
, should also provide default permissions for the file.
All calls to add repository file should somehow provide information on the owning entity. But because we don't know the rest of the data model that may be difficult.
We need an entity listener that will delete files associated with entities that no longer exist.
In some cases, the owning entity could be the Folder
implemented in #23 (closed) but even that entity requires an owner.