File Repository issueshttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues2020-04-14T08:41:12+02:00https://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/25"Owning entity" of repository file2020-04-14T08:41:12+02:00Matija Obreza"Owning entity" of repository fileFor purposes of automatic cleanup (deleting files from repository) and permission management we need to somehow record what entity "owns" the repository entry.
1. Adding a file must require specifying its owning entity and when that ent...For purposes of automatic cleanup (deleting files from repository) and permission management we need to somehow record what entity "owns" the repository entry.
1. Adding a file must require specifying its owning entity and when that entity is removed, we should also remove the files associated with it.
1. 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 but even that entity requires an owner.1.1