hyrax 3.1.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 +5 -5
- data/.dassie/Gemfile +1 -1
- data/.dassie/app/controllers/catalog_controller.rb +6 -0
- data/Dockerfile +2 -3
- data/app/actors/hyrax/actors/base_actor.rb +1 -1
- data/app/actors/hyrax/actors/collections_membership_actor.rb +3 -3
- data/app/actors/hyrax/actors/file_set_actor.rb +2 -0
- data/app/assets/stylesheets/hyrax/_styles.scss +5 -0
- data/app/controllers/concerns/hyrax/collections_controller_behavior.rb +13 -5
- data/app/controllers/concerns/hyrax/controller.rb +13 -2
- data/app/controllers/hyrax/admin/admin_sets_controller.rb +2 -19
- data/app/controllers/hyrax/admin/permission_template_accesses_controller.rb +5 -2
- data/app/controllers/hyrax/collections_controller.rb +3 -1
- data/app/controllers/hyrax/dashboard/collection_members_controller.rb +12 -9
- data/app/controllers/hyrax/dashboard/collections_controller.rb +92 -28
- data/app/controllers/hyrax/dashboard/nest_collections_controller.rb +75 -39
- data/app/controllers/hyrax/my_controller.rb +4 -4
- data/app/controllers/hyrax/workflow_actions_controller.rb +8 -5
- data/app/forms/hyrax/forms/administrative_set_form.rb +62 -0
- data/app/forms/hyrax/forms/collection_form.rb +2 -2
- data/app/forms/hyrax/forms/dashboard/nest_collection_form.rb +14 -4
- data/app/forms/hyrax/forms/pcdm_collection_form.rb +64 -0
- data/app/forms/hyrax/forms/resource_form.rb +15 -10
- data/app/forms/hyrax/forms/workflow_action_form.rb +4 -0
- data/app/helpers/hyrax/hyrax_helper_behavior.rb +9 -0
- data/app/indexers/hyrax/administrative_set_indexer.rb +6 -6
- data/app/indexers/hyrax/pcdm_collection_indexer.rb +2 -0
- data/app/models/admin_set.rb +16 -5
- 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 +2 -2
- data/app/models/concerns/hyrax/solr_document_behavior.rb +2 -2
- data/app/models/hyrax/administrative_set.rb +7 -1
- data/app/models/hyrax/permission.rb +1 -1
- data/app/models/hyrax/permission_template.rb +19 -5
- data/app/models/hyrax/work.rb +1 -0
- data/app/models/hyrax/workflow_action_info.rb +16 -0
- data/app/models/sipity/comment.rb +17 -0
- data/app/models/sipity.rb +11 -2
- data/app/presenters/hyrax/admin_set_presenter.rb +8 -3
- data/app/presenters/hyrax/collection_presenter.rb +3 -3
- data/app/presenters/hyrax/work_show_presenter.rb +2 -1
- data/app/search_builders/hyrax/abstract_type_relation.rb +4 -2
- 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 +1 -1
- data/app/services/hyrax/admin_set_create_service.rb +136 -54
- data/app/services/hyrax/collection_types/permissions_service.rb +1 -1
- data/app/services/hyrax/collections/collection_member_service.rb +12 -2
- data/app/services/hyrax/collections/permissions_create_service.rb +81 -79
- data/app/services/hyrax/collections/permissions_service.rb +1 -1
- data/app/services/hyrax/curation_concern.rb +24 -2
- data/app/services/hyrax/default_middleware_stack.rb +11 -0
- data/app/services/hyrax/ensure_well_formed_admin_set_service.rb +3 -3
- data/app/services/hyrax/listeners/active_fedora_acl_index_listener.rb +1 -0
- data/app/services/hyrax/listeners/metadata_index_listener.rb +25 -9
- data/app/services/hyrax/permission_manager.rb +4 -4
- data/app/services/hyrax/solr_service.rb +1 -1
- data/app/services/hyrax/statistics/collections/over_time.rb +2 -1
- 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/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/revoke_edit_from_depositor.rb +8 -2
- 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/dashboard/collections/_collection_title.html.erb +1 -1
- data/app/views/hyrax/dashboard/collections/_form.html.erb +1 -1
- data/app/views/hyrax/dashboard/collections/_sort_and_per_page.html.erb +1 -1
- data/app/views/hyrax/homepage/index.html.erb +1 -1
- 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/chart/hyrax/Chart.yaml +2 -2
- data/chart/hyrax/templates/deployment.yaml +6 -0
- data/config/features.rb +3 -0
- data/config/initializers/1_healthz.rb +1 -0
- data/config/initializers/listeners.rb +2 -1
- data/config/locales/hyrax.en.yml +1 -0
- data/db/seeds.rb +1 -1
- data/documentation/developing-your-hyrax-based-app.md +1 -1
- data/documentation/legacyREADME.md +1 -1
- data/hyrax.gemspec +1 -1
- data/lib/generators/hyrax/templates/catalog_controller.rb +3 -1
- data/lib/generators/hyrax/templates/config/initializers/hyrax.rb +10 -0
- 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/collection_name.rb +6 -2
- data/lib/hyrax/configuration.rb +28 -0
- data/lib/hyrax/form_fields.rb +1 -0
- data/lib/hyrax/publisher.rb +12 -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/shared_specs/hydra_works.rb +2 -0
- data/lib/hyrax/specs/shared_specs/indexers.rb +6 -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 +26 -0
- data/lib/hyrax/transactions/steps/add_to_collections.rb +13 -1
- data/lib/hyrax/transactions/steps/apply_collection_type_permissions.rb +29 -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/version.rb +1 -1
- data/lib/tasks/default_admin_set.rake +12 -11
- data/template.rb +1 -1
- metadata +16 -9
data/lib/hyrax/version.rb
CHANGED
@@ -3,24 +3,25 @@ namespace :hyrax do
|
|
3
3
|
namespace :default_admin_set do
|
4
4
|
desc "Create the Default Admin Set"
|
5
5
|
task create: :environment do
|
6
|
-
id =
|
7
|
-
|
8
|
-
# environment, that I may have an AdminSet in Fedora, but it is
|
9
|
-
# not indexed in Solr. This remediates that situation by
|
10
|
-
# ensuring we have an indexed AdminSet
|
11
|
-
AdminSet.find(id).update_index
|
12
|
-
if Hyrax::PermissionTemplate.find_by(source_id: id)
|
6
|
+
id = Hyrax::AdminSetCreateService.find_or_create_default_admin_set.id
|
7
|
+
if Hyrax::PermissionTemplate.find_by(source_id: id.to_s)
|
13
8
|
puts "Successfully created default admin set"
|
14
9
|
else
|
15
10
|
warn "ERROR: Default admin set exists but it does not have an " \
|
16
11
|
"associated permission template.\n\nThis may happen if you cleared your " \
|
17
|
-
"database but you did not clear out Fedora
|
12
|
+
"database but you did not clear out metadata datasource (e.g. Fedora, Postgres) " \
|
13
|
+
"and Solr.\n\n" \
|
18
14
|
"You could manually create the permission template in the rails console" \
|
19
15
|
" (non-destructive):\n\n" \
|
20
|
-
" Hyrax::PermissionTemplate.create!(source_id:
|
21
|
-
"OR you could start fresh by clearing
|
16
|
+
" Hyrax::PermissionTemplate.create!(source_id: Hyrax::AdminSetCreateService::DEFAULT_ID)\n\n" \
|
17
|
+
"OR you could start fresh by clearing the metadata datasource and Solr (destructive):\n\n" \
|
18
|
+
" For ActiveFedora or Wings Valkryie adapter (default), use...\n" \
|
22
19
|
" require 'active_fedora/cleaner'\n" \
|
23
|
-
" ActiveFedora::Cleaner.clean!\n\n"
|
20
|
+
" ActiveFedora::Cleaner.clean!\n\n" \
|
21
|
+
" For Valkyrie, use...\n" \
|
22
|
+
" conn = Hyrax.index_adapter.connection\n" \
|
23
|
+
" conn.delete_by_query('*:*', params: { 'softCommit' => true })\n" \
|
24
|
+
" Hyrax.persister.wipe!\n"
|
24
25
|
end
|
25
26
|
end
|
26
27
|
end
|
data/template.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hyrax
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Coyne
|
@@ -14,7 +14,7 @@ authors:
|
|
14
14
|
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
|
-
date: 2021-
|
17
|
+
date: 2021-11-16 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: rails
|
@@ -774,22 +774,22 @@ dependencies:
|
|
774
774
|
name: valkyrie
|
775
775
|
requirement: !ruby/object:Gem::Requirement
|
776
776
|
requirements:
|
777
|
+
- - "~>"
|
778
|
+
- !ruby/object:Gem::Version
|
779
|
+
version: '2'
|
777
780
|
- - ">="
|
778
781
|
- !ruby/object:Gem::Version
|
779
782
|
version: 2.1.1
|
780
|
-
- - "<"
|
781
|
-
- !ruby/object:Gem::Version
|
782
|
-
version: '3.0'
|
783
783
|
type: :runtime
|
784
784
|
prerelease: false
|
785
785
|
version_requirements: !ruby/object:Gem::Requirement
|
786
786
|
requirements:
|
787
|
+
- - "~>"
|
788
|
+
- !ruby/object:Gem::Version
|
789
|
+
version: '2'
|
787
790
|
- - ">="
|
788
791
|
- !ruby/object:Gem::Version
|
789
792
|
version: 2.1.1
|
790
|
-
- - "<"
|
791
|
-
- !ruby/object:Gem::Version
|
792
|
-
version: '3.0'
|
793
793
|
- !ruby/object:Gem::Dependency
|
794
794
|
name: capybara
|
795
795
|
requirement: !ruby/object:Gem::Requirement
|
@@ -1715,6 +1715,7 @@ files:
|
|
1715
1715
|
- app/forms/hyrax/forms/admin/collection_type_form.rb
|
1716
1716
|
- app/forms/hyrax/forms/admin/collection_type_participant_form.rb
|
1717
1717
|
- app/forms/hyrax/forms/admin_set_form.rb
|
1718
|
+
- app/forms/hyrax/forms/administrative_set_form.rb
|
1718
1719
|
- app/forms/hyrax/forms/batch_edit_form.rb
|
1719
1720
|
- app/forms/hyrax/forms/batch_upload_form.rb
|
1720
1721
|
- app/forms/hyrax/forms/collection_form.rb
|
@@ -1723,6 +1724,7 @@ files:
|
|
1723
1724
|
- app/forms/hyrax/forms/file_manager_form.rb
|
1724
1725
|
- app/forms/hyrax/forms/file_set_edit_form.rb
|
1725
1726
|
- app/forms/hyrax/forms/file_set_form.rb
|
1727
|
+
- app/forms/hyrax/forms/pcdm_collection_form.rb
|
1726
1728
|
- app/forms/hyrax/forms/permission.rb
|
1727
1729
|
- app/forms/hyrax/forms/permission_template_form.rb
|
1728
1730
|
- app/forms/hyrax/forms/resource_form.rb
|
@@ -2608,6 +2610,7 @@ files:
|
|
2608
2610
|
- app/views/shared/_footer.html.erb
|
2609
2611
|
- app/views/shared/_locale_picker.html.erb
|
2610
2612
|
- app/views/shared/_nav_safety_modal.html.erb
|
2613
|
+
- app/views/shared/_read_only.html.erb
|
2611
2614
|
- app/views/shared/_select_work_type_modal.html.erb
|
2612
2615
|
- artifacts/entity-relationship-diagram.dot
|
2613
2616
|
- artifacts/entity-relationship-diagram.pdf
|
@@ -2863,6 +2866,8 @@ files:
|
|
2863
2866
|
- lib/hyrax/specs/spy_listener.rb
|
2864
2867
|
- lib/hyrax/transactions.rb
|
2865
2868
|
- lib/hyrax/transactions/apply_change_set.rb
|
2869
|
+
- lib/hyrax/transactions/collection_create.rb
|
2870
|
+
- lib/hyrax/transactions/collection_update.rb
|
2866
2871
|
- lib/hyrax/transactions/container.rb
|
2867
2872
|
- lib/hyrax/transactions/create_work.rb
|
2868
2873
|
- lib/hyrax/transactions/destroy_work.rb
|
@@ -2871,6 +2876,7 @@ files:
|
|
2871
2876
|
- lib/hyrax/transactions/steps/add_to_collections.rb
|
2872
2877
|
- lib/hyrax/transactions/steps/add_to_parent.rb
|
2873
2878
|
- lib/hyrax/transactions/steps/apply_collection_permission_template.rb
|
2879
|
+
- lib/hyrax/transactions/steps/apply_collection_type_permissions.rb
|
2874
2880
|
- lib/hyrax/transactions/steps/apply_permission_template.rb
|
2875
2881
|
- lib/hyrax/transactions/steps/apply_visibility.rb
|
2876
2882
|
- lib/hyrax/transactions/steps/delete_resource.rb
|
@@ -2881,6 +2887,7 @@ files:
|
|
2881
2887
|
- lib/hyrax/transactions/steps/save.rb
|
2882
2888
|
- lib/hyrax/transactions/steps/save_access_control.rb
|
2883
2889
|
- lib/hyrax/transactions/steps/save_work.rb
|
2890
|
+
- lib/hyrax/transactions/steps/set_collection_type_gid.rb
|
2884
2891
|
- lib/hyrax/transactions/steps/set_default_admin_set.rb
|
2885
2892
|
- lib/hyrax/transactions/steps/set_modified_date.rb
|
2886
2893
|
- lib/hyrax/transactions/steps/set_uploaded_date_unless_present.rb
|
@@ -2978,7 +2985,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
2978
2985
|
- !ruby/object:Gem::Version
|
2979
2986
|
version: '0'
|
2980
2987
|
requirements: []
|
2981
|
-
rubygems_version: 3.
|
2988
|
+
rubygems_version: 3.2.29
|
2982
2989
|
signing_key:
|
2983
2990
|
specification_version: 4
|
2984
2991
|
summary: Hyrax is a front-end based on the robust Samvera framework, providing a user
|