[Zope-Checkins] CVS: Zope3/lib/python/Zope/PageTemplate - Expressions.py:1.1.2.8
Shane Hathaway
shane@cvs.zope.org
Thu, 28 Feb 2002 11:44:37 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/PageTemplate
In directory cvs.zope.org:/tmp/cvs-serv16025/PageTemplate
Modified Files:
Tag: Zope-3x-branch
Expressions.py
Log Message:
Enabled Zope security in TALES expressions and switched to the permissive
security policy for page template tests unrelated to security.
=== Zope3/lib/python/Zope/PageTemplate/Expressions.py 1.1.2.7 => 1.1.2.8 ===
reg('defer', DeferExpr)
-if 0 and sys.modules.has_key('Zope'):
+if sys.modules.has_key('Zope'):
+ # Apply security restrictions to expressions.
from Zope.App.Security.SecurityManagement import getSecurityManager
from Zope.Exceptions import Unauthorized
from ZRPythonExpr import PythonExpr, _SecureModuleImporter#, call_with_ns
SecureModuleImporter = _SecureModuleImporter()
else:
+ # No security available.
from PythonExpr import getSecurityManager, PythonExpr
from Zope.Exceptions import Unauthorized