Skip to content

Commit

Permalink
Merge pull request #2144 from mbertrand/haystack_fix_201505
Browse files Browse the repository at this point in the history
Fix issue with permissions filter when HAYSTACK_SEARCH = True
  • Loading branch information
simod committed May 4, 2015
2 parents 7d8b846 + d58fdfd commit d2ea477
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions geonode/api/resourcebase_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,16 +306,14 @@ def get_search(self, request, **kwargs):

if not settings.SKIP_PERMS_FILTER:
# Get the list of objects the user has access to
filter_set = set(
get_objects_for_user(
filter_set = get_objects_for_user(
request.user,
'base.view_resourcebase'
)
)
if settings.RESOURCE_PUBLISHING:
filter_set = filter_set.filter(is_published=True)

filter_set_ids = filter_set.values('id')
filter_set_ids = filter_set.values_list('id')
# Do the query using the filterset and the query term. Facet the
# results
if len(filter_set) > 0:
Expand Down

0 comments on commit d2ea477

Please sign in to comment.