Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hyrax::VisibilityPropagator does not support AllinsonFlex objects so visibility does not propagate down #136

Open
2 tasks
crisr15 opened this issue Oct 26, 2022 · 4 comments
Assignees
Labels
Allinson Flex bug Something isn't working Ingest

Comments

@crisr15
Copy link

crisr15 commented Oct 26, 2022

Staging: NoMethodError: undefined method 'propagate' for #<Hyrax::VisibilityPropagator::NullVisibilityPropogator:0x0000560eb785d498> Did you mean? propogate caused by running an importer

Image

Details

Issue originates in Hyrax::VisibilityPropagator. A bug exists in the nested class, NullVisibilityPropogator which is misspelling propagate.

However the larger issue is that the source type is not handled by a different propagator and falls to the NullVisibilityPropogator. Only Hyrax::WorkBehavior and Hyrax::Resource are expected source type classes, and with AllinsonFlex, we are most likely getting an AllinsonFlex source object. However since it only occurs in Bulkrax imports (unable to duplicate via UI updates), it may have a different cause.

One end result of this error is that when a CSV is import which contains a visibility column, the file set will correctly be assigned the correct visibility, but that visibility does not propagate down to its files.

UTK needs to override the Hyrax::VisibilityPropagator until AllinsonFlex can support this behavior.

See also samvera-labs/allinson_flex#107

Example of Work with mixed visibility
https://dc.utk-hyku-staging.notch8.cloud/concern/images/f0bdb789-c1e4-4e79-8ef8-3ae6b85249d4?locale=en

Example of Attachment with restricted visibility but Fileset is open
https://dc.utk-hyku-staging.notch8.cloud/concern/parent/f0bdb789-c1e4-4e79-8ef8-3ae6b85249d4/attachments/e97f9668-41a9-4143-9b39-6390806af59a

Testing

  • Execute a Bulkrax Import with this CSV vis_test.csv
  • After import is completed, observe that the Attachment and its FileSet both have private
@laritakr laritakr changed the title Staging: NoMethodError: undefined method `propagate' for #<Hyrax::VisibilityPropagator::NullVisibilityPropogator:0x0000560eb785d498> Did you mean? propogate Hyrax::VisibilityPropagator does not support AllinsonFlex objects so visibility does not propagate down Nov 9, 2022
@laritakr laritakr added bug Something isn't working Allinson Flex Ingest labels Nov 9, 2022
@jillpe jillpe moved this to Ready for Development in utk-hyku Nov 14, 2022
@laritakr laritakr moved this from Ready for Development to In Development in utk-hyku Nov 14, 2022
@kirkkwang kirkkwang self-assigned this Nov 16, 2022
@laritakr
Copy link
Contributor

see samvera/bulkrax#671

@ShanaLMoore ShanaLMoore moved this from In Development to Code Review in utk-hyku Nov 16, 2022
@kirkkwang kirkkwang moved this from Code Review to Deploy to Staging in utk-hyku Nov 21, 2022
@ShanaLMoore ShanaLMoore moved this from Deploy to Staging to SoftServ QA in utk-hyku Nov 21, 2022
@ShanaLMoore
Copy link
Contributor

@kirkkwang What is the best way to test this?

@kirkkwang
Copy link
Contributor

@ShanaLMoore I've updated the ticket with a basic test. Essentially, if you import a record with a file set from a remote URL, the Attachment and the FileSet both should have the same visibility. Setting the Attachment to restricted on the CSV should then set both the Attachment and its FileSet to private after import.

@ShanaLMoore
Copy link
Contributor

ShanaLMoore commented Nov 22, 2022

This passes QA. The test file needed to be updated (rights => rights_statement):

vis_test.csv

The image has an attachment, which has a fileset.

The Attachment has a restricted value in the visibility column. Once uploaded, it's displayed as private. Its file set's visibility is set to private too.

Image

Image

Nice work @kirkkwang @laritakr 🎉

Sidekiq has no retry jobs:

Image

@ShanaLMoore ShanaLMoore moved this from SoftServ QA to Client QA in utk-hyku Nov 22, 2022
@ShanaLMoore ShanaLMoore moved this from Client QA to Deploy to Production in utk-hyku Nov 22, 2022
@ShanaLMoore ShanaLMoore moved this from Deploy to Production to Done in utk-hyku Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Allinson Flex bug Something isn't working Ingest
Projects
Status: Done
Development

No branches or pull requests

4 participants