Changeset 7811 for main/waeup.kofa/trunk/src/waeup/kofa/permissions.txt
- Timestamp:
- 8 Mar 2012, 19:00:51 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/permissions.txt
r7334 r7811 1 SIRPpermissions and roles1 KOFA permissions and roles 2 2 ************************** 3 3 4 Permissions and roles used in a SIRPportal.4 Permissions and roles used in a KOFA portal. 5 5 6 6 .. :doctest: 7 .. :layer: waeup. sirp.testing.SIRPUnitTestLayer7 .. :layer: waeup.kofa.testing.KOFAUnitTestLayer 8 8 9 9 Convenience functions 10 10 ===================== 11 11 12 :mod:`waeup. sirp` offers some convenience functions to handle security12 :mod:`waeup.kofa` offers some convenience functions to handle security 13 13 roles. 14 14 … … 16 16 --------------------- 17 17 18 Gives us all roles defined in SIRP. We get tuples of18 Gives us all roles defined in KOFA. We get tuples of 19 19 kind 20 20 … … 24 24 with the ZCA (a string) and ``<ROLE>`` is the real role object. 25 25 26 >>> from waeup. sirp.permissions import get_all_roles26 >>> from waeup.kofa.permissions import get_all_roles 27 27 >>> get_all_roles() 28 28 <generator object...at 0x...> 29 29 30 30 >>> sorted(list(get_all_roles())) 31 [(u'waeup.ACManager', <waeup. sirp.permissions.ACManager object at 0x...]31 [(u'waeup.ACManager', <waeup.kofa.permissions.ACManager object at 0x...] 32 32 33 33 :func:`get_waeup_roles` 34 34 ----------------------- 35 35 36 Gives us all roles, except the SIRPspecific roles. We can get a list36 Gives us all roles, except the KOFA specific roles. We can get a list 37 37 with or without local roles: 38 38 39 >>> from waeup. sirp.permissions import get_waeup_roles39 >>> from waeup.kofa.permissions import get_waeup_roles 40 40 >>> len(list(get_waeup_roles())) 41 41 11 … … 48 48 ---------------------------- 49 49 50 We can get all role names defined in SIRP(except 'local'50 We can get all role names defined in KOFA (except 'local' 51 51 roles that are meant not to be assigned globally): 52 52 53 >>> from waeup. sirp.permissions import get_waeup_role_names53 >>> from waeup.kofa.permissions import get_waeup_role_names 54 54 >>> list(get_waeup_role_names()) 55 55 [u'waeup.ACManager', … … 72 72 they are not stored in the ZODB: 73 73 74 >>> from waeup. sirp.permissions import get_users_with_local_roles74 >>> from waeup.kofa.permissions import get_users_with_local_roles 75 75 >>> mycontext = object() 76 76 >>> people_and_roles = get_users_with_local_roles(mycontext)
Note: See TracChangeset for help on using the changeset viewer.