[Zope-Checkins] CVS: Zope/lib/python/AccessControl - ZopeGuards.py:1.12.4.5

Tres Seaver tseaver at zope.com
Fri Jan 16 13:13:14 EST 2004


Update of /cvs-repository/Zope/lib/python/AccessControl
In directory cvs.zope.org:/tmp/cvs-serv13462/lib/python/AccessControl

Modified Files:
      Tag: Zope-2_6-branch
	ZopeGuards.py 
Log Message:


  - Collector #1186:  some globals required to support certain operations
    in restricted code (e.g., list comprehensions in DTML expressions)
    were not propagated to all the right places.


=== Zope/lib/python/AccessControl/ZopeGuards.py 1.12.4.4 => 1.12.4.5 ===
--- Zope/lib/python/AccessControl/ZopeGuards.py:1.12.4.4	Fri Jan  9 13:51:01 2004
+++ Zope/lib/python/AccessControl/ZopeGuards.py	Fri Jan 16 13:12:43 2004
@@ -20,6 +20,7 @@
 import RestrictedPython
 from RestrictedPython.Guards import safe_builtins, full_write_guard
 from RestrictedPython.Utilities import utility_builtins
+from RestrictedPython.Eval import RestrictionCapableEval
 from SecurityManagement import getSecurityManager
 from SecurityInfo import secureModule
 from SimpleObjectPolicies import Containers, ContainerAssertions
@@ -408,6 +409,8 @@
                 }
 
 get_safe_globals = _safe_globals.copy
+
+RestrictionCapableEval.globals.update(_safe_globals)
 
 #
 #   Force our version of 'safe_builtins' into RestrctedPython.Guards.




More information about the Zope-Checkins mailing list