Skip to content

Commit

Permalink
[#2345] Sphinxify action/get.py:member_list() docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Hammond committed May 4, 2012
1 parent 09e5889 commit 5e8acd9
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions ckan/logic/action/get.py
Expand Up @@ -205,20 +205,24 @@ def related_list(context, data_dict=None):


def member_list(context, data_dict=None):
"""
Returns a list of (id,type,capacity) tuples that are members of the
specified group if the user has permission to 'get' the group.
context:
model - The CKAN model module
user - The name of the current user
data_dict:
id - The ID of the group to which we want to list members
object_type - The optional name of the type being added, all lowercase,
e.g. package, or user
capacity - The optional capacity of objects that we want to retrieve
"""
'''
Return the members of a group.
The user must have permission to 'get' the group.
:param id: the id or name of the group
:type id: string
:param object_type: restrict the members returned to those of a given type,
e.g. 'user' or 'package' (optional, default: None)
:type object_type: string
:param capacity: restrict the members returned to those with a given
capacity, e.g. 'member', 'editor', 'admin', 'public', 'private'
(optional, default: None)
:type capacity: string
:returns: the members of the group
:rtype: list of (id, type, capacity) tuples
'''
model = context['model']
user = context['user']

Expand Down

0 comments on commit 5e8acd9

Please sign in to comment.