Changeset 7186 for main/waeup.sirp/trunk/src/waeup/sirp/permissions.txt
- Timestamp:
- 24 Nov 2011, 11:31:04 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/permissions.txt
r7185 r7186 13 13 roles. 14 14 15 :func:`get AllRoles`16 ------------------- 15 :func:`get_all_roles` 16 --------------------- 17 17 18 18 Gives us all roles defined in a WAeUP SIRP portal. We get tuples of … … 24 24 with the ZCA (a string) and ``<ROLE>`` is the real role object. 25 25 26 >>> from waeup.sirp.permissions import get AllRoles27 >>> get AllRoles()26 >>> from waeup.sirp.permissions import get_all_roles 27 >>> get_all_roles() 28 28 <generator object...at 0x...> 29 29 30 >>> sorted(list(get AllRoles()))30 >>> sorted(list(get_all_roles())) 31 31 [(u'waeup.ACManager', <waeup.sirp.permissions.ACManager object at 0x...] 32 32 33 :func:`get WAeUPRoles`34 --------------------- 33 :func:`get_waeup_roles` 34 ----------------------- 35 35 36 36 Gives us all roles, except the WAeUP specific roles. We can get a list 37 37 with or without local roles: 38 38 39 >>> from waeup.sirp.permissions import get WAeUPRoles40 >>> len(list(get WAeUPRoles()))39 >>> from waeup.sirp.permissions import get_waeup_roles 40 >>> len(list(get_waeup_roles())) 41 41 10 42 42 43 >>> len(list(get WAeUPRoles(also_local=True)))43 >>> len(list(get_waeup_roles(also_local=True))) 44 44 16 45 45 46 46 47 :func:`get RoleNames`48 -------------------- 47 :func:`get_waeup_role_names` 48 ---------------------------- 49 49 50 50 We can get all role names defined in a WAeUP portal (except 'local' 51 51 roles that are meant not to be assigned globally): 52 52 53 >>> from waeup.sirp.permissions import get WAeUPRoleNames54 >>> list(get WAeUPRoleNames())53 >>> from waeup.sirp.permissions import get_waeup_role_names 54 >>> list(get_waeup_role_names()) 55 55 [u'waeup.ACManager', u'waeup.AcademicsOfficer', 56 56 u'waeup.AccommodationOfficer', u'waeup.Applicant',
Note: See TracChangeset for help on using the changeset viewer.