scientist-softserv / iiif_print

A gem for Hyrax/Samvera for displaying PDF pages in a IIIF Compliant viewer
Apache License 2.0
4 stars 1 forks source link

🐛 Propogate permissions to child works & filesets #349

Closed laritakr closed 2 months ago

laritakr commented 2 months ago

Story

Copies the permissions from the parent work to each of the spawned child works.

Prior to this commit, the child works split off of parent works were assigned permissions according to the parent's current visibility (in the case of a lease or embargo, this means they were assigned the value during lease or embargo).

This would protect the child work during the lease or embargo period but not allow it to be maintained by the expiry jobs, resulting in an incorrect visibility setting at the end of the lease or embargo.

Refs https://github.com/scientist-softserv/iiif_print/issues/347

Expected Behavior Before Changes

Child works were assigned the visibility of the parent. In cases of embargo or lease, this means they were assigned the initial "visibility during..." value.

Expected Behavior After Changes

Child works and child filesets are assigned the same permissions as the parent work.

Screenshots / Video

Child Work ![Screenshot 2024-04-30 at 11 13 43 AM](https://github.com/scientist-softserv/iiif_print/assets/17851674/d513c5f3-6040-40ea-b0d8-0251937f3c46)

Notes

Testing is blocked by https://github.com/scientist-softserv/iiif_print/issues/343

Due to an unknown source of a change in behavior, filesets in Hyku/hyrax double-combo are still only assigned the initial 'visibility during...' value. This should be addressed in a separate ticket.