Skip to content

Commit

Permalink
fix admin searches
Browse files Browse the repository at this point in the history
  • Loading branch information
stkenny committed Dec 13, 2024
1 parent ea2a5bd commit 090584c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/search_builders/my_collections_search_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class MyCollectionsSearchBuilder < SearchBuilder

def only_manage_or_edit_access(solr_parameters)
solr_parameters[:fq] ||= []
return if (scope.context[:current_user] && scope.context[:current_user].is_admin?)
return if current_ability&.current_user && current_ability.current_user.is_admin?

# any objects that the user can edit or manage
solr_parameters[:fq] << "(" + apply_manage_or_edit_permissions + ")"
Expand Down

0 comments on commit 090584c

Please sign in to comment.