Skip to content

Commit

Permalink
[#2939] Action organization_show
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Sep 25, 2012
1 parent ed69773 commit 3d5e995
Showing 1 changed file with 26 additions and 9 deletions.
35 changes: 26 additions & 9 deletions ckan/logic/action/get.py
Expand Up @@ -723,15 +723,7 @@ def revision_show(context, data_dict):
ref_package_by=ref_package_by)
return rev_dict

def group_show(context, data_dict):
'''Return the details of a group.
:param id: the id or name of the group
:type id: string
:rtype: dictionary
'''
def _group_or_org_show(context, data_dict):
model = context['model']
id = _get_or_bust(data_dict, 'id')

Expand All @@ -742,6 +734,7 @@ def group_show(context, data_dict):
raise NotFound

_check_access('group_show',context, data_dict)
_check_access('organization_show',context, data_dict)

group_dict = model_dictize.group_dictize(group, context)

Expand All @@ -761,6 +754,30 @@ def group_show(context, data_dict):
group_dict, errors = _validate(group_dict, schema, context=context)
return group_dict


def group_show(context, data_dict):
'''Return the details of a group.
:param id: the id or name of the group
:type id: string
:rtype: dictionary
'''
return _group_or_org_show(context, data_dict)

def organization_show(context, data_dict):
'''Return the details of a organization.
:param id: the id or name of the organization
:type id: string
:rtype: dictionary
'''
return _group_or_org_show(context, data_dict)


def group_package_show(context, data_dict):
'''Return the datasets (packages) of a group.
Expand Down

0 comments on commit 3d5e995

Please sign in to comment.