[Zope3-checkins] CVS: Zope3/src/zope/app/security - permission.py:1.6

Jim Fulton jim@zope.com
Fri, 7 Mar 2003 16:14:20 -0500


Update of /cvs-repository/Zope3/src/zope/app/security
In directory cvs.zope.org:/tmp/cvs-serv8374

Modified Files:
	permission.py 
Log Message:
Updated permission fields to accept CheckerPublic as a value.


=== Zope3/src/zope/app/security/permission.py 1.5 => 1.6 ===
--- Zope3/src/zope/app/security/permission.py:1.5	Tue Feb 11 21:17:31 2003
+++ Zope3/src/zope/app/security/permission.py	Fri Mar  7 16:13:49 2003
@@ -21,6 +21,7 @@
 from zope.component import getService
 from zope.app.services.servicenames import Permissions
 from zope.app.interfaces.security import IPermissionField
+from zope.security.checker import CheckerPublic
 
 
 def checkPermission(context, permission_id):
@@ -33,6 +34,8 @@
     __implements__ = IPermissionField
 
     def _validate(self, value):
+        if value is CheckerPublic:
+            return
         super(PermissionField, self)._validate(value)
         service = getService(self.context, Permissions)
         if service.getPermission(value) is None: