Skip to content

Commit

Permalink
[#2939] Update group/org show action
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Sep 27, 2012
1 parent e482f5a commit 9459943
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions ckan/logic/action/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ def revision_show(context, data_dict):
ref_package_by=ref_package_by)
return rev_dict

def _group_or_org_show(context, data_dict):
def _group_or_org_show(context, data_dict, is_org=False):
model = context['model']
id = _get_or_bust(data_dict, 'id')

Expand All @@ -733,8 +733,10 @@ def _group_or_org_show(context, data_dict):
if group is None:
raise NotFound

_check_access('group_show',context, data_dict)
_check_access('organization_show',context, data_dict)
if is_org:
_check_access('organization_show',context, data_dict)
else:
_check_access('group_show',context, data_dict)

group_dict = model_dictize.group_dictize(group, context)

Expand Down Expand Up @@ -775,7 +777,7 @@ def organization_show(context, data_dict):
:rtype: dictionary
'''
return _group_or_org_show(context, data_dict)
return _group_or_org_show(context, data_dict, is_org=True)


def group_package_show(context, data_dict):
Expand Down

0 comments on commit 9459943

Please sign in to comment.