Skip to content

Migrate repository rights to workers

https://redmine.teklia.com/issues/5720

Requires enterprise#31, because it is much easier to test locally with EE!

Workers used to inherit their access rights from their repositories when one is set. We are about to remove repositories, so those rights should be transferred down the workers.

  • Add a data migration that, for each Right whose content type is the repository's, creates or updates a right on all workers of this repository.

    When a right already exists for the same user or group, update that right only if the repository right's level is greater than the worker right's. This matches the existing behavior, where the greater of the worker's and repository's right levels is being used.

  • Remove the RepositoryACLMixin entirely. It is already completely unused.

  • Remove WorkerACLMixin.has_worker_access. The WorkerACLMixin's other methods can use has_access like everyone else.