Ignore:
Timestamp:
26 May 2011, 23:34:04 (13 years ago)
Author:
uli
Message:

#37

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/permissions.txt

    r6198 r6202  
    5454    >>> list(getWAeUPRoleNames())
    5555    [u'waeup.ApplicationsOfficer', u'waeup.PortalManager', u'waeup.PortalUser']
     56
     57:func:`get_users_with_local_roles`
     58----------------------------------
     59
     60We can get all users and their roles for a certain context
     61object. This even works for objects that cannot have local roles as
     62they are not stored in the ZODB:
     63
     64    >>> from waeup.sirp.permissions import get_users_with_local_roles
     65    >>> mycontext = object()
     66    >>> people_and_roles = get_users_with_local_roles(mycontext)
     67    >>> people_and_roles
     68    <generator object at 0x...>
     69
     70In this case, the result is empty:
     71
     72    >>> people_and_roles = list(people_and_roles)
     73    >>> people_and_roles
     74    []
Note: See TracChangeset for help on using the changeset viewer.