[Zope-Checkins] CVS: Zope2 - standard.py:1.4.44.1

shane@digicool.com shane@digicool.com
Thu, 26 Apr 2001 18:25:41 -0400 (EDT)


Update of /cvs-repository/Zope2/lib/python/Products/PythonScripts
In directory korak:/tmp/cvs-serv10837/lib/python/Products/PythonScripts

Modified Files:
      Tag: RestrictedPythonBranch
	standard.py 
Log Message:
Modified the way DTML namespaces implement security: now there is an
attribute of TemplateDicts called read_guard which implements the
"read guard" interface as defined by RestrictedPython.



--- Updated File standard.py in package Zope2 --
--- standard.py	2001/01/04 00:36:44	1.4
+++ standard.py	2001/04/26 22:25:09	1.4.44.1
@@ -105,6 +105,7 @@
  html_quote, url_quote, url_quote_plus, newline_to_br, thousands_commas
 
 from Globals import HTML
+from RestrictedPython.ZopeGuards import full_read_guard
 
 security.declarePublic('DTML')
 class DTML(HTML):
@@ -121,8 +122,8 @@
 
         finally: security.removeContext(self)
 
-    def validate(self, inst, parent, name, value, md):
-        return getSecurityManager().validate(inst, parent, name, value)
+    def read_guard(self, ob):
+        return full_read_guard(ob)
 
 security.apply(globals())