app/search_builders/hyrax/dashboard/collections_search_builder.rb
# adds a filter to exclude collections and admin sets created by the
# current user if the current user is not an admin.
# @param [Hash] solr_parameters
adds a filter to exclude collections and admin sets created by the
current user if the current user is not an admin.
adds a filter to exclude collections and admin sets created by the current user if the current user is not an admin .
def show_only_managed_collections_for_non_admins(solr_parameters)
        return if current_ability.admin?
        clauses = [
          '-' + ActiveFedora::SolrQueryBuilder.construct_query_for_rel(depositor: current_user_key),
          '-' + ActiveFedora::SolrQueryBuilder.construct_query_for_rel(has_model: ::AdminSet.to_s, creator: current_user_key)
        ]
        solr_parameters[:fq] ||= []
        solr_parameters[:fq] += ["(#{clauses.join(' OR ')})"]
      end
def show_only_managed_collections_for_non_admins ( solr_parameters ) return if current_ability . admin? clauses = [ '-' + ActiveFedora :: SolrQueryBuilder . construct_query_for_rel ( depositor : current_user_key ) , '-' + ActiveFedora :: SolrQueryBuilder . construct_query_for_rel ( has_model : :: AdminSet . to_s , creator : current_user_key ) ] solr_parameters [ :fq ] ||= [ ] solr_parameters [ :fq ] += [ "(#{clauses.join(' OR ')})" ] end
adds a filter to exclude collections and admin sets created by the
current user if the current user is not an admin.
adds a filter to exclude collections and admin sets created by the current user if the current user is not an admin .
solr_parameters
None