[Zpt] CVS: Packages/Products/PresentationTemplates - Expressions.py:1.7

evan@serenade.digicool.com evan@serenade.digicool.com
Wed, 14 Mar 2001 13:17:58 -0500


Update of /cvs-repository/Packages/Products/PresentationTemplates
In directory serenade:/slab/home/evan/Zope/pt/lib/python/Products/PresentationTemplates

Modified Files:
	Expressions.py 
Log Message:
Push the template onto the security stack, not the expression handler.



--- Updated File Expressions.py in package Packages/Products/PresentationTemplates --
--- Expressions.py	2001/03/09 16:14:17	1.6
+++ Expressions.py	2001/03/14 18:17:58	1.7
@@ -225,12 +225,13 @@
                 f.func_globals[vname] = val
 
         # Execute the function in a new security context.
+        template = contexts['template']
         security = getSecurityManager()
-        security.addContext(self)
+        security.addContext(template)
         try:
             return f()
         finally:
-            security.removeContext(self)
+            security.removeContext(template)
 
 class ImportExpr:
     def __init__(self, name, expr):