Ignore:
Timestamp:
7 Oct 2012, 21:49:12 (12 years ago)
Author:
Henrik Bettermann
Message:

Add function get_users_with_role. We need this for collecting email addresses.

File:
1 edited

Legend:

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

    r9300 r9309  
    8989    >>> people_and_roles
    9090    []
     91
     92:func:`get_users_with_role`
     93---------------------------
     94
     95We can get all users with a specific role for a certain context
     96object:
     97
     98    >>> from waeup.kofa.permissions import get_users_with_role
     99    >>> mycontext = object()
     100    >>> people = get_users_with_role('waeup.portalManager', mycontext)
     101    >>> people
     102    <generator object...at 0x...>
     103
     104In this case, the result is empty:
     105
     106    >>> people = list(people)
     107    >>> people
     108    []
Note: See TracChangeset for help on using the changeset viewer.