[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/Security - ZopeSecurityPolicy.py:1.1.2.24

Philipp von Weitershausen philikon@gmx.net
Wed, 10 Apr 2002 04:08:44 -0400


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

Modified Files:
      Tag: Zope-3x-branch
	ZopeSecurityPolicy.py 
Log Message:
Do not permission checks on tuples anymore


=== Zope3/lib/python/Zope/App/Security/ZopeSecurityPolicy.py 1.1.2.23 => 1.1.2.24 ===
 __version__='$Revision$'[11:-2]
 
-from types import StringType, TupleType
-
 from Zope.ComponentArchitecture import getAdapter
 from Zope.ContextWrapper.ContainmentIterator import ContainmentIterator
 
@@ -39,7 +37,7 @@
 from Zope.App.Security.PrincipalRoleManager import principalRoleManager
 from Zope.App.Security.Settings import Allow, Deny, Assign, Remove, Unset
 
-from types import StringTypes, ListType, IntType, MethodType, NoneType
+from types import StringType, StringTypes, TupleType, ListType, IntType, MethodType, NoneType
 
 # XXX: hack alert
 from Zope.ContextWrapper import getbaseobject
@@ -100,7 +98,7 @@
             
             
             unwrapped_value = getbaseobject(value)
-            if (isinstance(unwrapped_value, (ListType, StringTypes, IntType, NoneType))
+            if (isinstance(unwrapped_value, (ListType, TupleType, StringTypes, IntType, NoneType))
                 or 
                 getattr(value,'__allow_access_to_unprotected_subobjects__',0)):
                 permission = 'Zope.Public'