[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/Security - metaConfigure.py:1.1.2.15

Guido van Rossum guido@python.org
Thu, 13 Dec 2001 14:31:29 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/App/Security
In directory cvs.zope.org:/tmp/cvs-serv6288

Modified Files:
      Tag: Zope-3x-branch
	metaConfigure.py 
Log Message:
The contract for definePermission() and defineRole() changed; define
wrappers that swallow their return values.  Also, they are no longer
functions imported from the respective registries.


=== Zope3/lib/python/Zope/App/Security/metaConfigure.py 1.1.2.14 => 1.1.2.15 ===
 from protectClass import protectClass
 from publicClass import publicClass
-from PermissionRegistry import definePermission
-from RoleRegistry import defineRole
+from PermissionRegistry import registry as perm_reg
+from RoleRegistry import registry as role_reg
 from SecurityManager import setSecurityPolicy
 from PrincipalRegistry import globalRegistry
 
@@ -29,6 +29,12 @@
         policy = policy()
     setSecurityPolicy( policy )
 
+
+def definePermission(**kw):
+    perm_reg.definePermission(**kw)
+
+def defineRole(**kw):
+    role_reg.defineRole(**kw)
 
 def metaConfigure():
     register(namespace('security'), 'definePermission', definePermission)