Package bscw :: Package api :: Module ap_get_groups
[hide private]

Module ap_get_groups

get groups related to workspace

lists members of container - including groups and additional information
(cf. ap_get_members - this method will only show member names)

'resolve_groups' == False (default)
    subgroups are not resolved but included in response note: in order
    to (later) resolve groups you may call get_groups on a group
    (WSGroup or UserGroup)

'resolve_groups' == True
    subgroups are resolved, the list contains the members of subgroups
    note: resolved subgroups are not returned UserGroup objects
        (Community) are not resolved
    note: on own userid it will return your the content of the addressbook.
        The first element is always the userid.

'attribute_names'
    defines the attributes to be served for each
    group/member

    if 'roles' is in attribute_names, the roles of each member on the
    artifact is returned

    if 'wsroles' is in attribute_names, the roles of each member on the
    'workspace group' of the object are returned(!)

    note: only the roles of direct members on the object are returned,
    the roles for other members are 'None' (allows to distinguish direct
    members)

    if 'wsallroles' is in attribute_names, the 'unfiltered' roles of
    each member on the workspace group of the object are returned, i.e.
    the result is similar to 'wsroles', but for non direct members (i.e.
    members of resolved groups) their respective role _is_ included

    note: if the target object has its own workspace group (i.e. is
    shared and has direct members), then the result of 'wsallroles' and
    'roles' is the same.


API definition::

 API = (('object_id', 'ASCII string', 1),
        ('resolve_groups', 'boolean', 0),
        ('attribute_names', 'array', 0, [('item', 'ASCII string', 1)]))

(c) OrbiTeam Software, 2008


Version: $Rev: 24679 $

Functions [hide private]
 
param_def()
return the parameter definition
 
return_def()
return the result definition
 
_member_roles(artifact, member)
 
do_it(request, object_id, resolve_groups=False, attribute_names=['__id__', 'name', '__class__', 'roles'])
see above
Variables [hide private]
  log_api = logging.getLogger('api')
  __package__ = 'bscw.api'