diff --git a/app/helpers/hyku_knapsack/application_helper.rb b/app/helpers/hyku_knapsack/application_helper.rb index 6bf92f0..80b31de 100644 --- a/app/helpers/hyku_knapsack/application_helper.rb +++ b/app/helpers/hyku_knapsack/application_helper.rb @@ -2,12 +2,5 @@ module HykuKnapsack module ApplicationHelper - def tenant_registered_curation_concern_types - if current_account.mobius? - MOBIUS_CONCERNS - else - Hyrax.config.registered_curation_concern_types - MOBIUS_CONCERNS - end - end end end diff --git a/app/models/account_decorator.rb b/app/models/account_decorator.rb index 74d241e..24b760d 100644 --- a/app/models/account_decorator.rb +++ b/app/models/account_decorator.rb @@ -20,10 +20,6 @@ module AccountDecorator truman webster ].freeze - - def mobius? - name.in?(MOBIUS_TENANTS) - end end Account.prepend(AccountDecorator) diff --git a/app/models/concerns/bulkrax/has_local_processing.rb b/app/models/concerns/bulkrax/has_local_processing.rb index 5e9592b..b6a80cb 100644 --- a/app/models/concerns/bulkrax/has_local_processing.rb +++ b/app/models/concerns/bulkrax/has_local_processing.rb @@ -6,8 +6,6 @@ module HasLocalProcessing # add any special processing here, for example to reset a metadata property # to add a custom property from outside of the import data def add_local - return unless Account.find_by(tenant: Apartment::Tenant.current).mobius? - remove_escape_character_from_values! remove_duplicates_from_identifier! diff --git a/app/models/site_decorator.rb b/app/models/site_decorator.rb deleted file mode 100644 index 4aa2911..0000000 --- a/app/models/site_decorator.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -# OVERRIDE Hyku to set tenants with appropriate works - -module SiteDecorator - def instance - return NilSite.instance if Account.global_tenant? - - first_or_create do |site| - account = Account.find_by(tenant: Apartment::Tenant.current) - if account.mobius? - site.available_works = MOBIUS_CONCERNS - else - site.available_works = Hyrax.config.registered_curation_concern_types - MOBIUS_CONCERNS - end - end - end -end - -Site.singleton_class.send(:prepend, SiteDecorator) diff --git a/app/views/admin/work_types/edit.html.erb b/app/views/admin/work_types/edit.html.erb deleted file mode 100644 index ba35cdf..0000000 --- a/app/views/admin/work_types/edit.html.erb +++ /dev/null @@ -1,19 +0,0 @@ -<% provide :page_header do %> -

<%= t('hyku.admin.work_types') %>

-<% end %> - -
-
- <%= simple_form_for @site, url: '/admin/work_types' do |f| %> - <% tenant_registered_curation_concern_types.each do |type| %> -
- > - -
- <% end %> - <%= f.submit class: 'btn btn-primary' %> - <% end %> -
-
diff --git a/config/initializers/bulkrax.rb b/config/initializers/bulkrax.rb index 0e4e75a..d6e1c4d 100644 --- a/config/initializers/bulkrax.rb +++ b/config/initializers/bulkrax.rb @@ -28,11 +28,5 @@ 'relation' => { from: %w[sm_relation relation], split: true }, 'rights' => { from: %w[sm_rights rights], split: true } }) - - config.default_work_type = -> { Site.first&.available_works&.first } - - def Bulkrax.default_work_type - Bulkrax.config.default_work_type.call - end end end diff --git a/config/initializers/hyrax.rb b/config/initializers/hyrax.rb index 7f1d7ab..eb077a1 100644 --- a/config/initializers/hyrax.rb +++ b/config/initializers/hyrax.rb @@ -1,5 +1,5 @@ -MOBIUS_CONCERNS = ['MobiusWork'].freeze +# frozen_string_literal: true Hyrax.config do |config| - config.register_curation_concern MOBIUS_CONCERNS.map { |concern| concern.underscore.to_sym } + config.register_curation_concern :mobius_work end diff --git a/hyrax-webapp b/hyrax-webapp index 854921b..1512867 160000 --- a/hyrax-webapp +++ b/hyrax-webapp @@ -1 +1 @@ -Subproject commit 854921b0a02655c3b4aadd6412c06d073f25b608 +Subproject commit 151286793fed6c9699279dde472a6e1a009922d9