# 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