Skip to content

Commit

Permalink
[#2939] Search index privacy info
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Oct 3, 2012
1 parent c841455 commit a7c09de
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ckan/lib/search/index.py
Expand Up @@ -145,7 +145,11 @@ def index_package(self, pkg_dict, defer_commit=False):
# add groups
groups = pkg_dict.pop('groups', [])

pkg_dict['capacity'] = 'public'
# we use the capacity to make things private in the search index
if pkg_dict['private']:
pkg_dict['capacity'] = 'private'
else:
pkg_dict['capacity'] = 'public'

pkg_dict['groups'] = [group['name'] for group in groups]

Expand Down

0 comments on commit a7c09de

Please sign in to comment.