Sha256: 309881dc38fc0101c915e4d956356760ceb54e64b674d684d998fcbc299b4cd9

Contents?: true

Size: 594 Bytes

Versions: 13

Compression:

Stored size: 594 Bytes

Contents

# frozen_string_literal: true

module Bulkrax
  module ImportersHelper
    # borrowed from batch-importer https://github.com/samvera-labs/hyrax-batch_ingest/blob/main/app/controllers/hyrax/batch_ingest/batches_controller.rb
    def available_admin_sets
      # Restrict available_admin_sets to only those current user can deposit to.
      @available_admin_sets ||= Hyrax::Collections::PermissionsService.source_ids_for_deposit(ability: current_ability, source_type: 'admin_set').map do |admin_set_id|
        [AdminSet.find(admin_set_id).title.first, admin_set_id]
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
bulkrax-7.0.0 app/helpers/bulkrax/importers_helper.rb
bulkrax-5.5.1 app/helpers/bulkrax/importers_helper.rb
bulkrax-5.4.2 app/helpers/bulkrax/importers_helper.rb
bulkrax-5.3.1 app/helpers/bulkrax/importers_helper.rb
bulkrax-6.0.1 app/helpers/bulkrax/importers_helper.rb
bulkrax-6.0.0 app/helpers/bulkrax/importers_helper.rb
bulkrax-5.5.0 app/helpers/bulkrax/importers_helper.rb
bulkrax-5.4.1 app/helpers/bulkrax/importers_helper.rb
bulkrax-5.4.0 app/helpers/bulkrax/importers_helper.rb
bulkrax-5.3.0 app/helpers/bulkrax/importers_helper.rb
bulkrax-5.2.1 app/helpers/bulkrax/importers_helper.rb
bulkrax-5.2.0 app/helpers/bulkrax/importers_helper.rb
bulkrax-5.1.0 app/helpers/bulkrax/importers_helper.rb