app/models/concerns/hyrax/ability.rb
# Returns true if the current user is the depositor of the specified work
# @param document_id [String] the id of the document.
Returns true if the current user is the depositor of the specified work
Returns true if the current user is the depositor of the specified work
def user_is_depositor?(document_id)
      Hyrax::WorkRelation.new.search_with_conditions(
          id: document_id,
          DepositSearchBuilder.depositor_field => current_user.user_key
      ).any?
    end
def user_is_depositor? ( document_id ) Hyrax :: WorkRelation . new . search_with_conditions ( id : document_id , DepositSearchBuilder . depositor_field => current_user . user_key ) . any? end
Returns true if the current user is the depositor of the specified work
Returns true if the current user is the depositor of the specified work
document_id
the id of the document.
the id of the document .