[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/Security - metaConfigure.py:1.1.2.18
Tres Seaver
tseaver@zope.com
Thu, 13 Dec 2001 17:28:47 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/Security
In directory cvs.zope.org:/tmp/cvs-serv22025
Modified Files:
Tag: Zope-3x-branch
metaConfigure.py
Log Message:
- Add and test directives for principal-role map, principal-permission
map, and role-permission-map.
=== Zope3/lib/python/Zope/App/Security/metaConfigure.py 1.1.2.17 => 1.1.2.18 ===
from SecurityManager import setSecurityPolicy
from PrincipalRegistry import globalRegistry
+from RolePermissionManager import manager as role_perm_mgr
+from PrincipalPermissionManager import manager as principal_perm_mgr
+from PrincipalRoleManager import manager as principal_role_mgr
def setSecurityPolicy_directive( name ):
"""
@@ -50,5 +53,15 @@
register(namespace('security'), 'principal',
globalRegistry.definePrincipal)
+
register(namespace('security'), 'defaultPrincipal',
globalRegistry.defineDefaultPrincipal)
+
+ register(namespace('security'), 'grantPermissionToRole',
+ role_perm_mgr.grantPermissionToRole)
+
+ register(namespace('security'), 'grantPermissionToPrincipal',
+ principal_perm_mgr.grantPermissionToPrincipal)
+
+ register(namespace('security'), 'assignRoleToPrincipal',
+ principal_role_mgr.assignRoleToPrincipal)