This is related to #1092 but involves different logic in the Hyrax app, so I'm creating a separate issue.
With Bulkrax and Hyrax 3.x, it was possible to upload a work and a fileset with the fileset having more restrictive permissions/visibility than the parent work. This does not seem possible with Bulkrax and Hyrax 5. In my testing, the fileset automatically inherits the work's visibility, despite being explicitly set otherwise in the ingest CSV.
I believe the reason for this bug resides in a mismatch between Bulkrax's behavior and that of the Hyrax::WorkUploadsHandler.make_file_set_and_ingest method, which is invoked by the update_work.add_file_sets change set step.
The file_set_params hash contains the visibility settings on the fileset from the Bulkrax CSV import. However, the file_set_extra_params method looks for a key of :uploaded_file_id in the aforementioned hash, whereas coming from Bulkrax, that hash contains only a list of file ids under the key :uploaded_files. Not finding any uploaded_file_id's, the file_set_extra_params method returns an empty hash, and the check for additional visibility settings here fails.
Should Bulkrax pass an uploaded_file_id field in file_set_params? Or should Hyrax try to match the uploaded file ID both on that key and, if that match fails, on the values in the uploaded_files list?
This is related to #1092 but involves different logic in the Hyrax app, so I'm creating a separate issue.
With Bulkrax and Hyrax 3.x, it was possible to upload a work and a fileset with the fileset having more restrictive permissions/visibility than the parent work. This does not seem possible with Bulkrax and Hyrax 5. In my testing, the fileset automatically inherits the work's visibility, despite being explicitly set otherwise in the ingest CSV.
I believe the reason for this bug resides in a mismatch between Bulkrax's behavior and that of the
Hyrax::WorkUploadsHandler.make_file_set_and_ingestmethod, which is invoked by theupdate_work.add_file_setschange set step.The
file_set_paramshash contains the visibility settings on the fileset from the Bulkrax CSV import. However, thefile_set_extra_paramsmethod looks for a key of:uploaded_file_idin the aforementioned hash, whereas coming from Bulkrax, that hash contains only a list of file ids under the key:uploaded_files. Not finding anyuploaded_file_id's, thefile_set_extra_paramsmethod returns an empty hash, and the check for additional visibility settings here fails.Should Bulkrax pass an
uploaded_file_idfield infile_set_params? Or should Hyrax try to match the uploaded file ID both on that key and, if that match fails, on the values in theuploaded_fileslist?