Skip to content

Commit

Permalink
[#3361] fix for showing private datasets on org pages
Browse files Browse the repository at this point in the history
  • Loading branch information
wardi committed Dec 8, 2016
1 parent 124547a commit 461a2e9
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions ckan/controllers/group.py
Expand Up @@ -294,13 +294,6 @@ def pager_url(q=None, page=None):
else:
search_extras[param] = value

include_private = False
user_member_of_orgs = [org['id'] for org
in h.organizations_available('read')]

if (c.group and c.group.id in user_member_of_orgs):
include_private = True

facets = OrderedDict()

default_facet_titles = {'organization': _('Organizations'),
Expand All @@ -318,16 +311,12 @@ def pager_url(q=None, page=None):
# Facet titles
self._update_facet_titles(facets, group_type)

if 'capacity' in facets and (group_type != 'organization' or
not user_member_of_orgs):
del facets['capacity']

c.facet_titles = facets

data_dict = {
'q': q,
'fq': '',
'include_private': include_private,
'include_private': True,
'facet.field': facets.keys(),
'rows': limit,
'sort': sort_by,
Expand Down

0 comments on commit 461a2e9

Please sign in to comment.