Sha256: 4956db3aadbe825ee0248679bfffb0e09add65331fd9cf88ef671ef21b2fee95

Contents?: true

Size: 455 Bytes

Versions: 25

Compression:

Stored size: 455 Bytes

Contents

# frozen_string_literal: true
module Hyrax
  module Ability
    module SolrDocumentAbility
      def solr_document_abilities
        if admin?
          can [:manage], ::SolrDocument
        else
          can [:edit, :update, :destroy], ::SolrDocument do |solr_doc|
            test_edit(solr_doc.id)
          end
          can :read, ::SolrDocument do |solr_doc|
            test_read(solr_doc.id)
          end
        end
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
hyrax-5.0.1 app/models/concerns/hyrax/ability/solr_document_ability.rb
hyrax-5.0.0 app/models/concerns/hyrax/ability/solr_document_ability.rb
hyrax-5.0.0.rc3 app/models/concerns/hyrax/ability/solr_document_ability.rb
hyrax-5.0.0.rc2 app/models/concerns/hyrax/ability/solr_document_ability.rb
hyrax-5.0.0.rc1 app/models/concerns/hyrax/ability/solr_document_ability.rb
hyrax-3.6.0 app/models/concerns/hyrax/ability/solr_document_ability.rb
hyrax-4.0.0 app/models/concerns/hyrax/ability/solr_document_ability.rb
hyrax-4.0.0.rc3 app/models/concerns/hyrax/ability/solr_document_ability.rb
hyrax-4.0.0.rc2 app/models/concerns/hyrax/ability/solr_document_ability.rb
hyrax-4.0.0.rc1 app/models/concerns/hyrax/ability/solr_document_ability.rb
hyrax-3.5.0 app/models/concerns/hyrax/ability/solr_document_ability.rb
hyrax-4.0.0.beta2 app/models/concerns/hyrax/ability/solr_document_ability.rb
hyrax-3.4.2 app/models/concerns/hyrax/ability/solr_document_ability.rb
hyrax-4.0.0.beta1 app/models/concerns/hyrax/ability/solr_document_ability.rb
hyrax-3.4.1 app/models/concerns/hyrax/ability/solr_document_ability.rb
hyrax-3.4.0 app/models/concerns/hyrax/ability/solr_document_ability.rb
hyrax-3.3.0 app/models/concerns/hyrax/ability/solr_document_ability.rb
hyrax-3.2.0 app/models/concerns/hyrax/ability/solr_document_ability.rb
hyrax-3.1.0 app/models/concerns/hyrax/ability/solr_document_ability.rb
hyrax-3.0.2 app/models/concerns/hyrax/ability/solr_document_ability.rb