hyrax 3.0.0 → 3.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +46 -13
- data/.dassie/Gemfile +11 -6
- data/.dassie/app/controllers/catalog_controller.rb +6 -0
- data/.dassie/config/initializers/hyrax.rb +5 -0
- data/.dassie/config/initializers/riiif.rb +22 -20
- data/.dassie/config/role_map.yml +2 -0
- data/.dassie/db/seeds.rb +1 -1
- data/.dassie/package.json +3 -5
- data/.dockerignore +3 -0
- data/.env +1 -2
- data/.rubocop.yml +4 -0
- data/CONTAINERS.md +21 -1
- data/Dockerfile +42 -17
- data/Gemfile +21 -27
- data/app/actors/hyrax/actors/base_actor.rb +2 -2
- data/app/actors/hyrax/actors/collections_membership_actor.rb +3 -3
- data/app/actors/hyrax/actors/create_with_remote_files_actor.rb +85 -63
- data/app/actors/hyrax/actors/create_with_remote_files_ordered_members_actor.rb +7 -42
- data/app/actors/hyrax/actors/file_set_actor.rb +12 -5
- data/app/assets/stylesheets/hyrax/_styles.scss +5 -0
- data/app/controllers/concerns/hyrax/collections_controller_behavior.rb +30 -10
- data/app/controllers/concerns/hyrax/controller.rb +13 -2
- data/app/controllers/concerns/hyrax/embargoes_controller_behavior.rb +21 -9
- data/app/controllers/concerns/hyrax/leases_controller_behavior.rb +14 -5
- data/app/controllers/concerns/hyrax/works_controller_behavior.rb +22 -3
- data/app/controllers/hyrax/admin/admin_sets_controller.rb +2 -19
- data/app/controllers/hyrax/admin/permission_template_accesses_controller.rb +5 -6
- data/app/controllers/hyrax/admin/workflows_controller.rb +8 -2
- data/app/controllers/hyrax/collections_controller.rb +3 -1
- data/app/controllers/hyrax/dashboard/collection_members_controller.rb +24 -17
- data/app/controllers/hyrax/dashboard/collections_controller.rb +99 -35
- data/app/controllers/hyrax/dashboard/nest_collections_controller.rb +75 -39
- data/app/controllers/hyrax/file_sets_controller.rb +49 -13
- data/app/controllers/hyrax/my_controller.rb +4 -4
- data/app/controllers/hyrax/permissions_controller.rb +3 -4
- data/app/controllers/hyrax/workflow_actions_controller.rb +11 -6
- data/app/forms/hyrax/forms/administrative_set_form.rb +62 -0
- data/app/forms/hyrax/forms/collection_form.rb +14 -8
- data/app/forms/hyrax/forms/dashboard/nest_collection_form.rb +38 -6
- data/app/forms/hyrax/forms/file_set_form.rb +46 -0
- data/app/forms/hyrax/forms/pcdm_collection_form.rb +64 -0
- data/app/forms/hyrax/forms/permission.rb +23 -0
- data/app/forms/hyrax/forms/permission_template_form.rb +8 -2
- data/app/forms/hyrax/forms/resource_form.rb +34 -26
- data/app/forms/hyrax/forms/work_form.rb +5 -2
- data/app/forms/hyrax/forms/workflow_action_form.rb +4 -0
- data/app/helpers/hyrax/batch_edits_helper.rb +3 -1
- data/app/helpers/hyrax/collections_helper.rb +88 -2
- data/app/helpers/hyrax/dashboard_helper_behavior.rb +16 -5
- data/app/helpers/hyrax/embargo_helper.rb +4 -0
- data/app/helpers/hyrax/file_set_helper.rb +25 -6
- data/app/helpers/hyrax/hyrax_helper_behavior.rb +9 -0
- data/app/helpers/hyrax/lease_helper.rb +4 -0
- data/app/helpers/hyrax/url_helper.rb +4 -1
- data/app/helpers/hyrax/work_form_helper.rb +53 -0
- data/app/indexers/hyrax/administrative_set_indexer.rb +18 -0
- data/app/indexers/hyrax/pcdm_collection_indexer.rb +2 -0
- data/app/indexers/hyrax/valkyrie_file_set_indexer.rb +2 -0
- data/app/indexers/hyrax/valkyrie_indexer.rb +4 -3
- data/app/indexers/hyrax/valkyrie_work_indexer.rb +1 -1
- data/app/inputs/controlled_vocabulary_input.rb +2 -5
- data/app/jobs/attach_files_to_work_job.rb +19 -10
- data/app/jobs/attach_files_to_work_with_ordered_members_job.rb +6 -5
- data/app/jobs/ingest_local_file_job.rb +18 -2
- data/app/jobs/inherit_permissions_job.rb +9 -5
- data/app/models/admin_set.rb +22 -30
- data/app/models/collection_branding_info.rb +25 -9
- data/app/models/concerns/hyrax/ability/admin_set_ability.rb +31 -7
- data/app/models/concerns/hyrax/ability/collection_ability.rb +35 -20
- data/app/models/concerns/hyrax/ability/collection_type_ability.rb +1 -1
- data/app/models/concerns/hyrax/ability.rb +5 -3
- data/app/models/concerns/hyrax/collection_behavior.rb +17 -44
- data/app/models/concerns/hyrax/embargoable.rb +24 -0
- data/app/models/concerns/hyrax/file_set/characterization.rb +18 -12
- data/app/models/concerns/hyrax/solr_document_behavior.rb +11 -54
- data/app/models/concerns/hyrax/suppressible.rb +5 -0
- data/app/models/concerns/hyrax/user.rb +9 -3
- data/app/models/concerns/hyrax/work_behavior.rb +1 -1
- data/app/models/hyrax/administrative_set.rb +7 -1
- data/app/models/hyrax/file_set.rb +6 -0
- data/app/models/hyrax/pcdm_collection.rb +1 -0
- data/app/models/hyrax/permission.rb +1 -1
- data/app/models/hyrax/permission_template.rb +112 -12
- data/app/models/hyrax/virus_scanner.rb +27 -18
- data/app/models/hyrax/work.rb +1 -0
- data/app/models/hyrax/workflow_action_info.rb +16 -0
- data/app/models/sipity/agent.rb +1 -0
- data/app/models/sipity/comment.rb +17 -0
- data/app/models/sipity/entity.rb +30 -8
- data/app/models/sipity/workflow.rb +1 -0
- data/app/models/sipity.rb +53 -2
- data/app/presenters/hyrax/admin_set_options_presenter.rb +12 -8
- data/app/presenters/hyrax/admin_set_presenter.rb +13 -4
- data/app/presenters/hyrax/admin_set_selection_presenter.rb +116 -0
- data/app/presenters/hyrax/collection_presenter.rb +44 -23
- data/app/presenters/hyrax/file_set_presenter.rb +6 -1
- data/app/presenters/hyrax/file_usage.rb +3 -2
- data/app/presenters/hyrax/pcdm_member_presenter_factory.rb +119 -0
- data/app/presenters/hyrax/stats_usage_presenter.rb +2 -1
- data/app/presenters/hyrax/trophy_presenter.rb +33 -4
- data/app/presenters/hyrax/user_profile_presenter.rb +11 -1
- data/app/presenters/hyrax/version_list_presenter.rb +19 -0
- data/app/presenters/hyrax/version_presenter.rb +3 -2
- data/app/presenters/hyrax/work_show_presenter.rb +32 -6
- data/app/presenters/hyrax/work_usage.rb +5 -3
- data/app/renderers/hyrax/renderers/attribute_renderer.rb +10 -2
- data/app/search_builders/hyrax/abstract_type_relation.rb +4 -2
- data/app/search_builders/hyrax/admin_set_search_builder.rb +1 -1
- data/app/search_builders/hyrax/collection_member_search_builder.rb +6 -1
- data/app/search_builders/hyrax/dashboard/collections_search_builder.rb +1 -1
- data/app/search_builders/hyrax/exposed_models_relation.rb +1 -1
- data/app/search_builders/hyrax/filter_by_type.rb +1 -2
- data/app/search_builders/hyrax/my/collections_search_builder.rb +2 -2
- data/app/search_builders/hyrax/nested_collections_parent_search_builder.rb +1 -1
- data/app/search_builders/hyrax/single_collection_search_builder.rb +1 -1
- data/app/services/hyrax/admin_set_create_service.rb +136 -52
- data/app/services/hyrax/collection_types/permissions_service.rb +1 -1
- data/app/services/hyrax/collections/collection_member_search_service.rb +72 -0
- data/app/services/hyrax/collections/collection_member_service.rb +122 -27
- data/app/services/hyrax/collections/migration_service.rb +4 -2
- data/app/services/hyrax/collections/nested_collection_persistence_service.rb +12 -13
- data/app/services/hyrax/collections/nested_collection_query_service.rb +2 -0
- data/app/services/hyrax/collections/permissions_create_service.rb +82 -78
- data/app/services/hyrax/collections/permissions_service.rb +1 -1
- data/app/services/hyrax/contextual_path.rb +24 -1
- data/app/services/hyrax/curation_concern.rb +24 -2
- data/app/services/hyrax/custom_queries/find_file_metadata.rb +7 -5
- data/app/services/hyrax/custom_queries/navigators/parent_collections_navigator.rb +46 -0
- data/app/services/hyrax/default_middleware_stack.rb +11 -0
- data/app/services/hyrax/edit_permissions_service.rb +74 -41
- data/app/services/hyrax/ensure_well_formed_admin_set_service.rb +3 -3
- data/app/services/hyrax/find_objects_via_solr_service.rb +31 -0
- data/app/services/hyrax/listeners/active_fedora_acl_index_listener.rb +1 -0
- data/app/services/hyrax/listeners/member_cleanup_listener.rb +26 -0
- data/app/services/hyrax/listeners/metadata_index_listener.rb +25 -9
- data/app/services/hyrax/listeners/object_lifecycle_listener.rb +1 -1
- data/app/services/hyrax/listeners/trophy_cleanup_listener.rb +17 -0
- data/app/services/hyrax/listeners.rb +2 -0
- data/app/services/hyrax/multiple_membership_checker.rb +53 -29
- data/app/services/hyrax/permission_manager.rb +4 -4
- data/app/services/hyrax/persist_derivatives.rb +3 -1
- data/app/services/hyrax/resource_status.rb +7 -0
- data/app/services/hyrax/search_service.rb +4 -2
- data/app/services/hyrax/solr_query_builder_service.rb +45 -8
- data/app/services/hyrax/solr_query_service.rb +224 -0
- data/app/services/hyrax/solr_service.rb +9 -2
- data/app/services/hyrax/statistics/collections/over_time.rb +2 -1
- data/app/services/hyrax/statistics/depositors/summary.rb +2 -1
- data/app/services/hyrax/thumbnail_path_service.rb +1 -1
- data/app/services/hyrax/visibility_intention.rb +20 -2
- data/app/services/hyrax/visibility_propagator.rb +30 -1
- data/app/services/hyrax/work_uploads_handler.rb +17 -2
- data/app/services/hyrax/workflow/abstract_notification.rb +2 -2
- data/app/services/hyrax/workflow/action_taken_service.rb +16 -4
- data/app/services/hyrax/workflow/actionable_objects.rb +70 -0
- data/app/services/hyrax/workflow/activate_object.rb +5 -4
- data/app/services/hyrax/workflow/changes_required_notification.rb +5 -4
- data/app/services/hyrax/workflow/deactivate_object.rb +7 -5
- data/app/services/hyrax/workflow/deposited_notification.rb +8 -4
- data/app/services/hyrax/workflow/grant_edit_to_depositor.rb +7 -3
- data/app/services/hyrax/workflow/grant_read_to_depositor.rb +10 -3
- data/app/services/hyrax/workflow/object_in_workflow_decorator.rb +31 -0
- data/app/services/hyrax/workflow/revoke_edit_from_depositor.rb +8 -2
- data/app/services/hyrax/workflow/status_list_service.rb +43 -13
- data/app/services/hyrax/workflow/workflow_action_service.rb +4 -1
- data/app/views/hyrax/admin/admin_sets/_form.html.erb +1 -1
- data/app/views/hyrax/base/_form_child_work_relationships.html.erb +1 -1
- data/app/views/hyrax/base/_form_relationships.html.erb +1 -2
- data/app/views/hyrax/base/_form_rendering.html.erb +1 -1
- data/app/views/hyrax/base/_form_representative.html.erb +1 -1
- data/app/views/hyrax/base/_form_thumbnail.html.erb +1 -1
- data/app/views/hyrax/base/_form_visibility_error.html.erb +2 -0
- data/app/views/hyrax/base/_guts4form.html.erb +3 -3
- data/app/views/hyrax/base/_representative_media.html.erb +1 -1
- data/app/views/hyrax/base/_show_actions.html.erb +2 -2
- data/app/views/hyrax/base/_work_button_row.html.erb +1 -1
- data/app/views/hyrax/batch_uploads/_form.html.erb +1 -1
- data/app/views/hyrax/collections/show.html.erb +1 -1
- data/app/views/hyrax/dashboard/collections/_collection_title.html.erb +1 -1
- data/app/views/hyrax/dashboard/collections/_form.html.erb +4 -4
- data/app/views/hyrax/dashboard/collections/_form_branding.html.erb +1 -1
- data/app/views/hyrax/dashboard/collections/_list_collections.html.erb +1 -1
- data/app/views/hyrax/dashboard/collections/_sort_and_per_page.html.erb +1 -1
- data/app/views/hyrax/dashboard/collections/edit.html.erb +4 -2
- data/app/views/hyrax/dashboard/collections/new.html.erb +4 -2
- data/app/views/hyrax/dashboard/collections/show.html.erb +1 -1
- data/app/views/hyrax/file_sets/_actions.html.erb +10 -0
- data/app/views/hyrax/file_sets/edit.html.erb +1 -1
- data/app/views/hyrax/file_sets/media_display/_audio.html.erb +1 -1
- data/app/views/hyrax/file_sets/media_display/_default.html.erb +1 -1
- data/app/views/hyrax/file_sets/media_display/_image.html.erb +1 -1
- data/app/views/hyrax/file_sets/media_display/_office_document.html.erb +1 -1
- data/app/views/hyrax/file_sets/media_display/_pdf.html.erb +1 -1
- data/app/views/hyrax/file_sets/media_display/_video.html.erb +1 -1
- data/app/views/hyrax/file_sets/show.html.erb +1 -1
- data/app/views/hyrax/homepage/index.html.erb +1 -1
- data/app/views/hyrax/my/_admin_set_action_menu.html.erb +0 -11
- data/app/views/hyrax/my/_collection_action_menu.html.erb +1 -2
- data/app/views/hyrax/my/collections/_list_collections.html.erb +1 -1
- data/app/views/hyrax/my/collections/_modal_add_subcollection.html.erb +3 -5
- data/app/views/hyrax/my/collections/_modal_collection_types_to_create.html.erb +1 -1
- data/app/views/layouts/hyrax/dashboard.html.erb +1 -0
- data/app/views/layouts/hyrax.html.erb +1 -0
- data/app/views/shared/_read_only.html.erb +5 -0
- data/bin/db-migrate-seed.sh +3 -1
- data/bin/hyrax-entrypoint.sh +0 -14
- data/bin/solrcloud-assign-configset.sh +11 -3
- data/bin/solrcloud-upload-configset.sh +17 -6
- data/chart/hyrax/Chart.yaml +9 -5
- data/chart/hyrax/README.md +52 -5
- data/chart/hyrax/templates/_helpers.tpl +23 -1
- data/chart/hyrax/templates/branding-pvc.yaml +14 -0
- data/chart/hyrax/templates/configmap-env.yaml +14 -3
- data/chart/hyrax/templates/deployment-worker.yaml +129 -0
- data/chart/hyrax/templates/deployment.yaml +95 -0
- data/chart/hyrax/templates/derivatives-pvc.yaml +14 -0
- data/chart/hyrax/templates/ingress.yaml +13 -4
- data/chart/hyrax/templates/secrets.yaml +9 -0
- data/chart/hyrax/templates/uploads-pvc.yaml +14 -0
- data/chart/hyrax/values.yaml +114 -1
- data/config/brakeman.ignore +2 -2
- data/config/features.rb +50 -43
- data/config/initializers/1_healthz.rb +1 -0
- data/config/initializers/listeners.rb +4 -1
- data/config/initializers/valkryrie_storage.rb +7 -0
- data/config/locales/hyrax.de.yml +1 -1
- data/config/locales/hyrax.en.yml +2 -1
- data/config/locales/hyrax.es.yml +1 -1
- data/config/locales/hyrax.fr.yml +1 -1
- data/config/locales/hyrax.it.yml +1 -1
- data/config/locales/hyrax.pt-BR.yml +1 -1
- data/config/locales/hyrax.zh.yml +1 -1
- data/db/seeds.rb +1 -1
- data/docker-compose.yml +39 -8
- data/documentation/developing-your-hyrax-based-app.md +3 -3
- data/documentation/legacyREADME.md +3 -3
- data/hyrax.gemspec +1 -1
- data/lib/generators/hyrax/templates/catalog_controller.rb +3 -1
- data/lib/generators/hyrax/templates/config/initializers/hyrax.rb +15 -0
- data/lib/generators/hyrax/templates/config/initializers/riiif.rb +22 -20
- data/lib/generators/hyrax/work/templates/feature_spec.rb.erb +1 -1
- data/lib/generators/hyrax/work_resource/templates/indexer_spec.rb.erb +1 -0
- data/lib/hyrax/active_fedora_dummy_model.rb +62 -0
- data/lib/hyrax/collection_name.rb +6 -2
- data/lib/hyrax/configuration.rb +56 -0
- data/lib/hyrax/engine.rb +3 -1
- data/lib/hyrax/errors.rb +2 -0
- data/lib/hyrax/form_fields.rb +1 -0
- data/lib/hyrax/publisher.rb +12 -0
- data/lib/hyrax/resource_name.rb +1 -0
- data/lib/hyrax/resource_sync/change_list_writer.rb +2 -2
- data/lib/hyrax/resource_sync/resource_list_writer.rb +2 -2
- data/lib/hyrax/specs/capybara.rb +5 -3
- data/lib/hyrax/specs/shared_specs/hydra_works.rb +2 -0
- data/lib/hyrax/specs/shared_specs/indexers.rb +6 -0
- data/lib/hyrax/specs/shared_specs/valkyrie_storage_versions.rb +9 -0
- data/lib/hyrax/transactions/collection_create.rb +25 -0
- data/lib/hyrax/transactions/collection_update.rb +20 -0
- data/lib/hyrax/transactions/container.rb +47 -0
- data/lib/hyrax/transactions/file_set_destroy.rb +21 -0
- data/lib/hyrax/transactions/steps/add_file_sets.rb +3 -2
- data/lib/hyrax/transactions/steps/add_to_collections.rb +13 -1
- data/lib/hyrax/transactions/steps/add_to_parent.rb +36 -0
- data/lib/hyrax/transactions/steps/apply_collection_type_permissions.rb +29 -0
- data/lib/hyrax/transactions/steps/remove_file_set_from_work.rb +47 -0
- data/lib/hyrax/transactions/steps/save.rb +18 -6
- data/lib/hyrax/transactions/steps/set_collection_type_gid.rb +35 -0
- data/lib/hyrax/transactions/work_create.rb +2 -1
- data/lib/hyrax/valkyrie_can_can_adapter.rb +3 -0
- data/lib/hyrax/valkyrie_simple_path_generator.rb +20 -0
- data/lib/hyrax/version.rb +1 -1
- data/lib/hyrax.rb +9 -0
- data/lib/tasks/collection_type_global_id.rake +1 -1
- data/lib/tasks/default_admin_set.rake +12 -11
- data/lib/tasks/regenerate_derivatives.rake +12 -0
- data/lib/wings/active_fedora_converter/default_work.rb +15 -0
- data/lib/wings/converter_value_mapper.rb +2 -2
- data/lib/wings/model_transformer.rb +17 -1
- data/lib/wings/orm_converter.rb +18 -2
- data/lib/wings/setup.rb +2 -0
- data/lib/wings/valkyrie/persister.rb +7 -5
- data/lib/wings/valkyrie/query_service.rb +60 -17
- data/lib/wings/valkyrie/storage.rb +56 -1
- data/lib/wings.rb +0 -21
- data/template.rb +1 -1
- metadata +42 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1dfd66c313400a16a149d5bdb7a2495164c18bce86b9bd8f079970b68e328cf
|
4
|
+
data.tar.gz: 66c678a483a9f2822712dea5f8448e55d9019dbdc47605b9a03177d0465ab775
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8309e7eb25d84767fd2395e04326df0c1f925bef0a2618818b0430327ac623f0f4078abbd45b5a966ccb6ccbc4c6bc233823e7d1b00d08b5e977771c97be4306
|
7
|
+
data.tar.gz: dd759280930d7cbc3448b3fafbfae5bbb631f9eb8fb93a9dca2e9ee73b3226f71d5b453ec29a40ac087dacf076059b752e8e72b2b9e35c5efab1b54743a1e958
|
data/.circleci/config.yml
CHANGED
@@ -12,7 +12,7 @@ jobs:
|
|
12
12
|
default: 1.17.3
|
13
13
|
rails_version:
|
14
14
|
type: string
|
15
|
-
default: '5.2.
|
15
|
+
default: '5.2.6'
|
16
16
|
executor:
|
17
17
|
name: 'samvera/ruby'
|
18
18
|
ruby_version: << parameters.ruby_version >>
|
@@ -22,6 +22,17 @@ jobs:
|
|
22
22
|
NOKOGIRI_USE_SYSTEM_LIBRARIES: true
|
23
23
|
steps:
|
24
24
|
- samvera/cached_checkout
|
25
|
+
|
26
|
+
- run:
|
27
|
+
name: Check for a branch named 'master'
|
28
|
+
command: |
|
29
|
+
git fetch --all --quiet --prune --prune-tags
|
30
|
+
if [[ -n "$(git branch --all --list master */master)" ]]; then
|
31
|
+
echo "A branch named 'master' was found. Please remove it."
|
32
|
+
echo "$(git branch --all --list master */master)"
|
33
|
+
fi
|
34
|
+
[[ -z "$(git branch --all --list master */master)" ]]
|
35
|
+
|
25
36
|
- samvera/bundle_for_gem:
|
26
37
|
ruby_version: << parameters.ruby_version >>
|
27
38
|
bundler_version: << parameters.bundler_version >>
|
@@ -63,7 +74,7 @@ jobs:
|
|
63
74
|
default: 1.17.3
|
64
75
|
rails_version:
|
65
76
|
type: string
|
66
|
-
default: '5.2.
|
77
|
+
default: '5.2.6'
|
67
78
|
executor:
|
68
79
|
name: 'samvera/ruby_fcrepo_solr_redis_postgres'
|
69
80
|
ruby_version: << parameters.ruby_version >>
|
@@ -125,16 +136,31 @@ jobs:
|
|
125
136
|
command: bundle exec rake app:db:migrate
|
126
137
|
- samvera/parallel_rspec
|
127
138
|
|
139
|
+
# Trigger a workflow on the nurax repository that will deploy the most recent hyrax gem code to https://nurax-dev.curationexperts.com/
|
140
|
+
deploy:
|
141
|
+
docker:
|
142
|
+
- image: ubuntu
|
143
|
+
steps:
|
144
|
+
- run:
|
145
|
+
name: Install curl
|
146
|
+
command: apt-get update && apt-get install -y curl
|
147
|
+
- run:
|
148
|
+
name: "Trigger Nurax deploy"
|
149
|
+
command: |
|
150
|
+
curl -X POST https://circleci.com/api/v2/project/gh/curationexperts/nurax/pipeline \
|
151
|
+
--header "Circle-Token: $NURAX_CIRCLECI_TOKEN" \
|
152
|
+
--header 'Accept: text/plain' \
|
153
|
+
--header 'Content-Type: application/json'
|
128
154
|
workflows:
|
129
155
|
version: 2
|
130
156
|
ruby2-5-8:
|
131
157
|
jobs:
|
132
158
|
- bundle:
|
133
159
|
ruby_version: "2.5.8"
|
134
|
-
rails_version: "5.2.
|
160
|
+
rails_version: "5.2.6"
|
135
161
|
- build:
|
136
162
|
ruby_version: "2.5.8"
|
137
|
-
rails_version: "5.2.
|
163
|
+
rails_version: "5.2.6"
|
138
164
|
requires:
|
139
165
|
- bundle
|
140
166
|
- test:
|
@@ -146,10 +172,10 @@ workflows:
|
|
146
172
|
jobs:
|
147
173
|
- bundle:
|
148
174
|
ruby_version: "2.6.6"
|
149
|
-
rails_version: "5.2.
|
175
|
+
rails_version: "5.2.6"
|
150
176
|
- build:
|
151
177
|
ruby_version: "2.6.6"
|
152
|
-
rails_version: "5.2.
|
178
|
+
rails_version: "5.2.6"
|
153
179
|
requires:
|
154
180
|
- bundle
|
155
181
|
- test:
|
@@ -163,21 +189,28 @@ workflows:
|
|
163
189
|
hyrax_valkyrie: "true"
|
164
190
|
requires:
|
165
191
|
- build
|
166
|
-
ruby2-7-
|
192
|
+
ruby2-7-4:
|
167
193
|
jobs:
|
168
194
|
- bundle:
|
169
|
-
ruby_version: "2.7.
|
170
|
-
rails_version: "5.2.
|
195
|
+
ruby_version: "2.7.4"
|
196
|
+
rails_version: "5.2.6"
|
171
197
|
bundler_version: "2.1.4"
|
172
198
|
- build:
|
173
|
-
ruby_version: "2.7.
|
174
|
-
rails_version: "5.2.
|
199
|
+
ruby_version: "2.7.4"
|
200
|
+
rails_version: "5.2.6"
|
175
201
|
bundler_version: "2.1.4"
|
176
202
|
requires:
|
177
203
|
- bundle
|
178
204
|
- test:
|
179
|
-
name: "ruby2-7-
|
180
|
-
ruby_version: "2.7.
|
205
|
+
name: "ruby2-7-4"
|
206
|
+
ruby_version: "2.7.4"
|
181
207
|
bundler_version: "2.1.4"
|
182
208
|
requires:
|
183
209
|
- build
|
210
|
+
nurax-dev_deploy:
|
211
|
+
jobs:
|
212
|
+
- deploy:
|
213
|
+
filters:
|
214
|
+
branches:
|
215
|
+
only:
|
216
|
+
- main
|
data/.dassie/Gemfile
CHANGED
@@ -1,14 +1,21 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# Attempts to determine if a global gem source has ready been added by another Gemfile
|
3
|
+
if @sources.global_rubygems_source == Bundler::SourceList.new.global_rubygems_source
|
4
|
+
Bundler.ui.info '[Dassie] Adding global rubygems source.'
|
5
|
+
source 'https://rubygems.org'
|
6
|
+
else
|
7
|
+
Bundler.ui.info "[Dassie] Global rubygems source already set: #{@sources.global_rubygems_source.inspect}"
|
8
|
+
end
|
2
9
|
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
3
10
|
|
4
|
-
ruby '2.7.
|
11
|
+
ruby '2.7.4'
|
5
12
|
|
6
13
|
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
|
7
14
|
gem 'rails', '~> 5.2.4', '>= 5.2.4.4'
|
8
15
|
# Use postgresql as the database for Active Record
|
9
16
|
gem 'pg', '>= 0.18', '< 2.0'
|
10
17
|
# Use Puma as the app server
|
11
|
-
gem 'puma', '~> 3.
|
18
|
+
gem 'puma', '~> 4.3.8'
|
12
19
|
# Use SCSS for stylesheets
|
13
20
|
gem 'sass-rails', '~> 5.0'
|
14
21
|
# Use Uglifier as compressor for JavaScript assets
|
@@ -43,9 +50,7 @@ end
|
|
43
50
|
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
44
51
|
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
|
45
52
|
|
46
|
-
|
47
|
-
gem 'hyrax', path: ENV.fetch('HYRAX_ENGINE_PATH', '..')
|
48
|
-
rescue; end
|
53
|
+
gemspec name: 'hyrax', path: ENV.fetch('HYRAX_ENGINE_PATH', '..')
|
49
54
|
|
50
55
|
gem 'rsolr', '>= 1.0', '< 3'
|
51
56
|
gem 'bootstrap-sass', '~> 3.0'
|
@@ -5,6 +5,8 @@ class CatalogController < ApplicationController
|
|
5
5
|
|
6
6
|
# This filter applies the hydra access controls
|
7
7
|
before_action :enforce_show_permissions, only: :show
|
8
|
+
# Allow all search options when in read-only mode
|
9
|
+
skip_before_action :check_read_only
|
8
10
|
|
9
11
|
def self.uploaded_field
|
10
12
|
"system_create_dtsi"
|
@@ -28,6 +30,10 @@ class CatalogController < ApplicationController
|
|
28
30
|
config.view.gallery.partials = [:index_header, :index]
|
29
31
|
config.view.slideshow.partials = [:index]
|
30
32
|
|
33
|
+
# Because too many times on Samvera tech people raise a problem regarding a failed query to SOLR.
|
34
|
+
# Often, it's because they inadvertently exceeded the character limit of a GET request.
|
35
|
+
config.http_method = :post
|
36
|
+
|
31
37
|
## Default parameters to send to solr for all search-like requests. See also SolrHelper#solr_search_params
|
32
38
|
config.default_solr_params = {
|
33
39
|
qt: "search",
|
@@ -39,6 +39,11 @@ Hyrax.config do |config|
|
|
39
39
|
##
|
40
40
|
# Set the system-wide virus scanner
|
41
41
|
config.virus_scanner = Hyrax::VirusScanner
|
42
|
+
|
43
|
+
##
|
44
|
+
# To index to the Valkyrie core, uncomment the following two lines.
|
45
|
+
# config.query_index_from_valkyrie = true
|
46
|
+
# config.index_adapter = :solr_index
|
42
47
|
end
|
43
48
|
|
44
49
|
Date::DATE_FORMATS[:standard] = "%m/%d/%Y"
|
@@ -1,27 +1,29 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
|
3
|
-
Riiif::Image.
|
4
|
-
|
5
|
-
|
6
|
-
|
2
|
+
ActiveSupport::Reloader.to_prepare do
|
3
|
+
Riiif::Image.file_resolver = Riiif::HttpFileResolver.new
|
4
|
+
Riiif::Image.info_service = lambda do |id, _file|
|
5
|
+
# id will look like a path to a pcdm:file
|
6
|
+
# (e.g. rv042t299%2Ffiles%2F6d71677a-4f80-42f1-ae58-ed1063fd79c7)
|
7
|
+
# but we just want the id for the FileSet it's attached to.
|
7
8
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
end
|
9
|
+
# Capture everything before the first slash
|
10
|
+
fs_id = id.sub(/\A([^\/]*)\/.*/, '\1')
|
11
|
+
resp = Hyrax::SolrService.get("id:#{fs_id}")
|
12
|
+
doc = resp['response']['docs'].first
|
13
|
+
raise "Unable to find solr document with id:#{fs_id}" unless doc
|
14
|
+
{ height: doc['height_is'], width: doc['width_is'], format: doc['mime_type_ssi'], channels: doc['alpha_channels_ssi'] }
|
15
|
+
end
|
15
16
|
|
16
|
-
Riiif::Image.file_resolver.id_to_uri = lambda do |id|
|
17
|
-
|
18
|
-
|
17
|
+
Riiif::Image.file_resolver.id_to_uri = lambda do |id|
|
18
|
+
Hyrax::Base.id_to_uri(CGI.unescape(id)).tap do |url|
|
19
|
+
Rails.logger.info "Riiif resolved #{id} to #{url}"
|
20
|
+
end
|
19
21
|
end
|
20
|
-
end
|
21
22
|
|
22
|
-
Riiif::Image.authorization_service = Hyrax::IIIFAuthorizationService
|
23
|
+
Riiif::Image.authorization_service = Hyrax::IIIFAuthorizationService
|
23
24
|
|
24
|
-
Riiif.not_found_image = Rails.root.join('app', 'assets', 'images', 'us_404.svg')
|
25
|
-
Riiif.unauthorized_image = Rails.root.join('app', 'assets', 'images', 'us_404.svg')
|
25
|
+
Riiif.not_found_image = Rails.root.join('app', 'assets', 'images', 'us_404.svg')
|
26
|
+
Riiif.unauthorized_image = Rails.root.join('app', 'assets', 'images', 'us_404.svg')
|
26
27
|
|
27
|
-
Riiif::Engine.config.cache_duration = 365.days
|
28
|
+
Riiif::Engine.config.cache_duration = 365.days
|
29
|
+
end
|
data/.dassie/config/role_map.yml
CHANGED
data/.dassie/db/seeds.rb
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
# movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
|
7
7
|
# Character.create(name: 'Luke', movie: movies.first)
|
8
8
|
|
9
|
-
Hyrax::Engine.load_seed
|
9
|
+
Hyrax::Engine.load_seed unless ActiveModel::Type::Boolean.new.cast(ENV["SKIP_HYRAX_ENGINE_SEED"])
|
10
10
|
|
11
11
|
puts "\n== Loading users"
|
12
12
|
User.where(email: 'admin@example.com').first_or_create do |f|
|
data/.dassie/package.json
CHANGED
@@ -8,10 +8,8 @@
|
|
8
8
|
"scripts": {
|
9
9
|
"preinstall": "rm -rf ./public/uv",
|
10
10
|
"postinstall": "yarn run uv-install && yarn run uv-config",
|
11
|
-
"uv-install": "
|
12
|
-
"uv-config": "
|
11
|
+
"uv-install": "cp -r ./node_modules/universalviewer/dist ./public/uv",
|
12
|
+
"uv-config": "cp ./config/uv/uv.html ./public/uv/uv.html & cp ./config/uv/uv-config.json ./public/uv/"
|
13
13
|
},
|
14
|
-
"devDependencies": {
|
15
|
-
"shx": "^0.3.2"
|
16
|
-
}
|
14
|
+
"devDependencies": {}
|
17
15
|
}
|
data/.dockerignore
CHANGED
data/.env
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
CAPYBARA_SERVER=http://app:3010
|
2
1
|
CHROME_HEADLESS_MODE=false
|
3
2
|
DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL=true
|
4
3
|
DATABASE_TEST_URL=postgresql://hyrax_user:hyrax_password@postgres/hyrax_test?pool=5
|
@@ -7,7 +6,7 @@ DB_PORT=5432
|
|
7
6
|
DB_HOST=postgres
|
8
7
|
FCREPO_PORT=8080
|
9
8
|
FCREPO_HOST=fcrepo
|
10
|
-
FCREPO_REST_PATH=
|
9
|
+
FCREPO_REST_PATH=rest
|
11
10
|
FCREPO_TEST_BASE_PATH=/test
|
12
11
|
HUB_URL=http://chrome:4444/wd/hub
|
13
12
|
HYRAX_DERIVATIVES_PATH=/app/samvera/hyrax-webapp/derivatives/
|
data/.rubocop.yml
CHANGED
data/CONTAINERS.md
CHANGED
@@ -8,7 +8,7 @@ providing better guidance around deployment.
|
|
8
8
|
Where are we at? It's complicated. What we have below is experimental support, but one that we want to push
|
9
9
|
towards. We need your help to keep pushing in this direction. So dig in and prepare to get your hands dirty.
|
10
10
|
|
11
|
-
The [Hyrax Engine Development](#hyrax-engine-development) is further along than the [Docker Image for Hyrax-based Applications](docker-image-for-hyrax-based-applications) which is further along than [Deploying to Production](#deploying-to-production).
|
11
|
+
The [Hyrax Engine Development](#hyrax-engine-development) is further along than the [Docker Image for Hyrax-based Applications](#docker-image-for-hyrax-based-applications) which is further along than [Deploying to Production](#deploying-to-production).
|
12
12
|
|
13
13
|
<!-- NOTE: This title is referenced in the top-level README.md. Keep that in mind if you change it. -->
|
14
14
|
## Hyrax Engine Development
|
@@ -107,6 +107,26 @@ I (Jeremy) find myself wanting to debug the application. This requires a somewh
|
|
107
107
|
|
108
108
|
This advice comes from [Debugging Rails App With Docker Compose: How to use Byebug in a dockerized rails app](https://medium.com/gogox-technology/debugging-rails-app-with-docker-compose-39a3767962f4).
|
109
109
|
|
110
|
+
### Troubleshooting
|
111
|
+
|
112
|
+
#### Bad Address SOLR
|
113
|
+
|
114
|
+
With `docker-compose up` running, if you see the following, then there may be issues with file permissions:
|
115
|
+
|
116
|
+
```
|
117
|
+
db_migrate_1 | waiting for solr:8983
|
118
|
+
db_migrate_1 | nc: bad address 'solr'
|
119
|
+
```
|
120
|
+
|
121
|
+
Check the Docker application logs and look for permission errors:
|
122
|
+
|
123
|
+
```
|
124
|
+
Executing /opt/docker-solr/scripts/precreate-core hyrax_test /opt/solr/server/configsets/hyraxconf
|
125
|
+
cp: cannot create directory '/var/solr/data/hyrax_test': Permission denied
|
126
|
+
```
|
127
|
+
|
128
|
+
The solution that appears to work is to `docker-compose down --volumes`; This will tear down the docker instance, and remove the volumes. You can then run `docker-compose up` to get back to work. _**Note:** the `--volumes` switch will remove all custom data._
|
129
|
+
|
110
130
|
<!-- NOTE: This title is referenced in the top-level documentation/developing-your-hyrax-based-app.md. Keep that in mind if you change it. -->
|
111
131
|
## Docker Image for Hyrax-based Applications
|
112
132
|
|
data/Dockerfile
CHANGED
@@ -1,6 +1,5 @@
|
|
1
|
-
ARG RUBY_VERSION=2.7.
|
2
|
-
|
3
|
-
FROM ruby:$RUBY_VERSION-alpine3.12 as hyrax-base
|
1
|
+
ARG RUBY_VERSION=2.7.4
|
2
|
+
FROM ruby:$RUBY_VERSION-alpine3.14 as hyrax-base
|
4
3
|
|
5
4
|
ARG DATABASE_APK_PACKAGE="postgresql-dev"
|
6
5
|
ARG EXTRA_APK_PACKAGES="git"
|
@@ -43,21 +42,8 @@ ONBUILD COPY --chown=1001:101 $APP_PATH /app/samvera/hyrax-webapp
|
|
43
42
|
ONBUILD RUN bundle install --jobs "$(nproc)"
|
44
43
|
ONBUILD RUN RAILS_ENV=production SECRET_KEY_BASE=`bin/rake secret` DB_ADAPTER=nulldb DATABASE_URL='postgresql://fake' bundle exec rake assets:precompile
|
45
44
|
|
46
|
-
FROM hyrax-base as hyrax-engine-dev
|
47
|
-
|
48
|
-
ARG APP_PATH=.dassie
|
49
|
-
ARG BUNDLE_WITHOUT=
|
50
|
-
|
51
|
-
ENV HYRAX_ENGINE_PATH /app/samvera/hyrax-engine
|
52
|
-
|
53
|
-
COPY --chown=1001:101 $APP_PATH /app/samvera/hyrax-webapp
|
54
|
-
COPY --chown=1001:101 . /app/samvera/hyrax-engine
|
55
|
-
|
56
|
-
RUN cd /app/samvera/hyrax-engine && bundle install --jobs "$(nproc)"
|
57
|
-
RUN RAILS_ENV=production SECRET_KEY_BASE='fakesecret1234' DB_ADAPTER=nulldb DATABASE_URL='postgresql://fake' bundle exec rake assets:precompile
|
58
|
-
|
59
45
|
|
60
|
-
FROM hyrax-
|
46
|
+
FROM hyrax-base as hyrax-worker-base
|
61
47
|
|
62
48
|
ENV MALLOC_ARENA_MAX=2
|
63
49
|
|
@@ -78,3 +64,42 @@ RUN mkdir -p /app/fits && \
|
|
78
64
|
ENV PATH="${PATH}:/app/fits"
|
79
65
|
|
80
66
|
CMD bundle exec sidekiq
|
67
|
+
|
68
|
+
|
69
|
+
FROM hyrax-worker-base as hyrax-worker
|
70
|
+
|
71
|
+
ARG APP_PATH=.
|
72
|
+
ARG BUNDLE_WITHOUT="development test"
|
73
|
+
|
74
|
+
ONBUILD COPY --chown=1001:101 $APP_PATH /app/samvera/hyrax-webapp
|
75
|
+
ONBUILD RUN bundle install --jobs "$(nproc)"
|
76
|
+
ONBUILD RUN RAILS_ENV=production SECRET_KEY_BASE=`bin/rake secret` DB_ADAPTER=nulldb DATABASE_URL='postgresql://fake' bundle exec rake assets:precompile
|
77
|
+
|
78
|
+
|
79
|
+
FROM hyrax-base as hyrax-engine-dev
|
80
|
+
|
81
|
+
ARG APP_PATH=.dassie
|
82
|
+
ARG BUNDLE_WITHOUT=
|
83
|
+
|
84
|
+
ENV HYRAX_ENGINE_PATH /app/samvera/hyrax-engine
|
85
|
+
|
86
|
+
COPY --chown=1001:101 $APP_PATH /app/samvera/hyrax-webapp
|
87
|
+
COPY --chown=1001:101 . /app/samvera/hyrax-engine
|
88
|
+
|
89
|
+
RUN gem update bundler && gem cleanup bundler && bundle -v && \
|
90
|
+
bundle install --jobs "$(nproc)" && \
|
91
|
+
cd $HYRAX_ENGINE_PATH && bundle install --jobs "$(nproc)"
|
92
|
+
RUN RAILS_ENV=production SECRET_KEY_BASE='fakesecret1234' DB_ADAPTER=nulldb DATABASE_URL='postgresql://fake' bundle exec rake assets:precompile
|
93
|
+
|
94
|
+
|
95
|
+
FROM hyrax-worker-base as hyrax-engine-dev-worker
|
96
|
+
|
97
|
+
ARG APP_PATH=.dassie
|
98
|
+
ARG BUNDLE_WITHOUT=
|
99
|
+
|
100
|
+
ENV HYRAX_ENGINE_PATH /app/samvera/hyrax-engine
|
101
|
+
|
102
|
+
COPY --chown=1001:101 $APP_PATH /app/samvera/hyrax-webapp
|
103
|
+
COPY --chown=1001:101 . /app/samvera/hyrax-engine
|
104
|
+
|
105
|
+
RUN bundle install --jobs "$(nproc)"
|
data/Gemfile
CHANGED
@@ -1,44 +1,38 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
source 'https://rubygems.org'
|
3
|
-
|
4
|
-
|
2
|
+
source 'https://rubygems.org'
|
3
|
+
# Please see hyrax.gemspec for dependency information.
|
4
|
+
gemspec
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
end
|
6
|
+
group :development, :test do
|
7
|
+
gem 'benchmark-ips'
|
8
|
+
gem 'easy_translate'
|
9
|
+
gem 'i18n-tasks'
|
10
|
+
gem 'okcomputer'
|
11
|
+
gem 'pry' unless ENV['CI']
|
12
|
+
gem 'pry-byebug' unless ENV['CI']
|
13
|
+
gem 'ruby-prof', require: false
|
14
|
+
gem "simplecov", require: false
|
16
15
|
end
|
17
16
|
|
18
17
|
test_app_path = ENV['RAILS_ROOT'] ||
|
19
18
|
ENV.fetch('ENGINE_CART_DESTINATION', File.expand_path('.internal_test_app', File.dirname(__FILE__)))
|
20
19
|
test_app_gemfile = File.expand_path('Gemfile', test_app_path)
|
21
20
|
|
21
|
+
# rubocop:disable Bundler/DuplicatedGem
|
22
22
|
if File.exist?(test_app_gemfile)
|
23
23
|
begin
|
24
|
+
Bundler.ui.info "[Hyrax] Including test application dependencies from #{test_app_gemfile}"
|
24
25
|
eval_gemfile test_app_gemfile
|
25
26
|
rescue Bundler::GemfileError => e
|
26
27
|
Bundler.ui.warn '[Hyrax] Skipping Rails application dependencies:'
|
27
28
|
Bundler.ui.warn e.message
|
28
29
|
end
|
30
|
+
elsif ENV['RAILS_VERSION'] == 'edge'
|
31
|
+
gem 'rails', github: 'rails/rails', source: 'https://rubygems.org'
|
32
|
+
ENV['ENGINE_CART_RAILS_OPTIONS'] = '--edge --skip-turbolinks'
|
33
|
+
elsif ENV['RAILS_VERSION']
|
34
|
+
gem 'rails', ENV['RAILS_VERSION'], source: 'https://rubygems.org'
|
29
35
|
else
|
30
|
-
Bundler.ui.warn
|
31
|
-
|
32
|
-
# rubocop:disable Bundler/DuplicatedGem
|
33
|
-
if ENV['RAILS_VERSION']
|
34
|
-
if ENV['RAILS_VERSION'] == 'edge'
|
35
|
-
gem 'rails', github: 'rails/rails', source: 'https://rubygems.org'
|
36
|
-
ENV['ENGINE_CART_RAILS_OPTIONS'] = '--edge --skip-turbolinks'
|
37
|
-
else
|
38
|
-
gem 'rails', ENV['RAILS_VERSION'], source: 'https://rubygems.org'
|
39
|
-
end
|
40
|
-
end
|
41
|
-
# rubocop:enable Bundler/DuplicatedGem
|
42
|
-
|
43
|
-
eval_gemfile File.expand_path('spec/test_app_templates/Gemfile.extra', File.dirname(__FILE__))
|
36
|
+
Bundler.ui.warn '[Hyrax] Skipping all Rails dependency injection'
|
44
37
|
end
|
38
|
+
# rubocop:enable Bundler/DuplicatedGem
|
@@ -37,7 +37,7 @@ module Hyrax
|
|
37
37
|
# @return [Boolean] true if destroy was successful
|
38
38
|
def destroy(env)
|
39
39
|
env.curation_concern.in_collection_ids.each do |id|
|
40
|
-
destination_collection =
|
40
|
+
destination_collection = Hyrax.config.collection_class.find(id)
|
41
41
|
destination_collection.members.delete(env.curation_concern)
|
42
42
|
destination_collection.update_index
|
43
43
|
end
|
@@ -95,7 +95,7 @@ module Hyrax
|
|
95
95
|
def clean_attributes(attributes)
|
96
96
|
attributes[:license] = Array(attributes[:license]) if attributes.key? :license
|
97
97
|
attributes[:rights_statement] = Array(attributes[:rights_statement]) if attributes.key? :rights_statement
|
98
|
-
remove_blank_attributes!(attributes)
|
98
|
+
remove_blank_attributes!(attributes).except('file_set')
|
99
99
|
end
|
100
100
|
|
101
101
|
# If any attributes are blank remove them
|
@@ -69,7 +69,7 @@ module Hyrax
|
|
69
69
|
# Adds the item to the ordered members so that it displays in the items
|
70
70
|
# along side the FileSets on the show page
|
71
71
|
def add(env, id)
|
72
|
-
collection =
|
72
|
+
collection = Hyrax.config.collection_class.find(id)
|
73
73
|
collection.reindex_extent = Hyrax::Adapters::NestingIndexAdapter::LIMITED_REINDEX
|
74
74
|
|
75
75
|
return unless env.current_ability.can?(:deposit, collection)
|
@@ -78,7 +78,7 @@ module Hyrax
|
|
78
78
|
|
79
79
|
# Remove the object from the members set and the ordered members list
|
80
80
|
def remove(curation_concern, id)
|
81
|
-
collection =
|
81
|
+
collection = Hyrax.config.collection_class.find(id)
|
82
82
|
curation_concern.member_of_collections.delete(collection)
|
83
83
|
end
|
84
84
|
|
@@ -107,7 +107,7 @@ module Hyrax
|
|
107
107
|
collection_id = attributes_collection.first.second['id']
|
108
108
|
|
109
109
|
# Do not apply permissions to work if collection type is configured not to
|
110
|
-
collection =
|
110
|
+
collection = Hyrax.config.collection_class.find(collection_id)
|
111
111
|
return unless collection.share_applies_to_new_works?
|
112
112
|
|
113
113
|
# Save the collection id in env for use in apply_permission_template_actor
|