diff --git a/app/assets/stylesheets/hyrax/_admin_features.scss b/app/assets/stylesheets/hyrax/_admin_features.scss
new file mode 100644
index 0000000000..92697a9488
--- /dev/null
+++ b/app/assets/stylesheets/hyrax/_admin_features.scss
@@ -0,0 +1,18 @@
+// Modify the batch_upload feature flipper to be disabled
+tr[data-feature="batch-upload"] {
+ background-color: #f8f9fa;
+
+ td.name {
+ color: #6c757d !important;
+ opacity: 0.65 !important;
+ }
+
+ td.status .badge {
+ background-color: #dc3545 !important;
+ }
+
+ td.toggle .btn-group {
+ pointer-events: none;
+ opacity: 0.5;
+ }
+}
diff --git a/app/assets/stylesheets/hyrax/_hyrax.scss b/app/assets/stylesheets/hyrax/_hyrax.scss
index 18076b42f9..a4df07e582 100644
--- a/app/assets/stylesheets/hyrax/_hyrax.scss
+++ b/app/assets/stylesheets/hyrax/_hyrax.scss
@@ -1,16 +1,16 @@
@import "hyrax/variables", "hyrax/file_sets", "hyrax/settings", "hyrax/html",
- "hyrax/header", "hyrax/styles", "hyrax/file-listing",
- "hyrax/browse_everything_overrides", "hyrax/nestable", "hyrax/collections",
- "hyrax/collection_types", "hyrax/batch-edit", "hyrax/home-page",
- "hyrax/featured", "hyrax/usage-stats", "hyrax/catalog", "hyrax/buttons",
- "hyrax/tinymce", "hyrax/proxy-rights", "hyrax/file-show", "hyrax/work-show",
- "hyrax/modal", "hyrax/forms", "hyrax/form", "hyrax/file_manager",
- "hyrax/form-progress", "hyrax/positioning", "hyrax/fixedsticky",
- "hyrax/file_upload", "hyrax/representative-media", "hyrax/footer",
- "hyrax/select_work_type", "hyrax/users", "hyrax/dashboard", "hyrax/sidebar",
- "hyrax/controlled_vocabulary", "hyrax/accessibility", "hyrax/recent",
- "hyrax/viewer", "hyrax/breadcrumbs", "hyrax/facets", "hyrax/card",
- "hyrax/badge";
+"hyrax/header", "hyrax/styles", "hyrax/file-listing",
+"hyrax/browse_everything_overrides", "hyrax/nestable", "hyrax/collections",
+"hyrax/collection_types", "hyrax/batch-edit", "hyrax/home-page",
+"hyrax/featured", "hyrax/usage-stats", "hyrax/catalog", "hyrax/buttons",
+"hyrax/tinymce", "hyrax/proxy-rights", "hyrax/file-show", "hyrax/work-show",
+"hyrax/modal", "hyrax/forms", "hyrax/form", "hyrax/file_manager",
+"hyrax/form-progress", "hyrax/positioning", "hyrax/fixedsticky",
+"hyrax/file_upload", "hyrax/representative-media", "hyrax/footer",
+"hyrax/select_work_type", "hyrax/users", "hyrax/dashboard", "hyrax/sidebar",
+"hyrax/controlled_vocabulary", "hyrax/accessibility", "hyrax/recent",
+"hyrax/viewer", "hyrax/breadcrumbs", "hyrax/facets", "hyrax/card",
+"hyrax/badge", "hyrax/admin_features";
@import "hydra-editor/multi_value_fields";
@import "typeahead";
@import "sharing_buttons";
diff --git a/app/strategies/hyrax/strategies/disable_feature_strategy.rb b/app/strategies/hyrax/strategies/disable_feature_strategy.rb
new file mode 100644
index 0000000000..05896153b4
--- /dev/null
+++ b/app/strategies/hyrax/strategies/disable_feature_strategy.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+module Hyrax::Strategies
+ class DisableFeatureStrategy < Flipflop::Strategies::AbstractStrategy
+ def enabled?(feature)
+ # Set batch upload to disabled
+ return false if feature == :batch_upload
+ # Return nil to pass through to next strategy for other features
+ nil
+ end
+ end
+end
diff --git a/config/features.rb b/config/features.rb
index f1d6a26dad..bbc1f02fa6 100644
--- a/config/features.rb
+++ b/config/features.rb
@@ -2,6 +2,8 @@
Flipflop.configure do
# Strategies will be used in the order listed here.
strategy :cookie
+ # Configuration to prevent features from being enabled
+ strategy Hyrax::Strategies::DisableFeatureStrategy
strategy :active_record, class: Hyrax::Feature
strategy Hyrax::Strategies::YamlStrategy, config: Hyrax.config.feature_config_path
strategy :default
@@ -39,9 +41,11 @@
default: true,
description: "Ability to assign uploaded items to an admin set"
+ # rubocop:disable Layout/LineLength
feature :batch_upload,
default: false,
- description: "Enable uploading batches of works"
+ description: "NOTICE: This feature has been temporarily disabled. To add or upload works in bulk, please use the Bulkrax importer.".html_safe
+ # rubocop:enable Layout/LineLength
feature :proxy_deposit,
default: true,
diff --git a/spec/features/batch_edit_spec.rb b/spec/features/batch_edit_spec.rb
index 545fe5328d..c29ff618ab 100644
--- a/spec/features/batch_edit_spec.rb
+++ b/spec/features/batch_edit_spec.rb
@@ -48,6 +48,8 @@
describe 'editing' do
it 'changes the value of each field for all selected works' do
+ skip 'due to temporarily disabling the batch_upload feature'
+ # Ref: https://github.com/samvera/hyrax/issues/7185
click_on 'batch-edit'
fill_in_batch_edit_fields_and_verify!
reloaded_work1 = wings_disabled ? Hyrax.query_service.find_by(id: work1.id) : work1.reload
@@ -97,6 +99,8 @@
end
it 'updates visibility' do
+ skip 'due to temporarily disabling the batch_upload feature'
+ # Ref: https://github.com/samvera/hyrax/issues/7185
click_on 'batch-edit'
find('#edit_permissions_link').click
batch_edit_expand('permissions_visibility')