[Zope-Checkins] CVS: Zope2 - ZCatalog.py:1.85.10.2
shane@digicool.com
shane@digicool.com
Thu, 26 Apr 2001 18:25:41 -0400 (EDT)
Update of /cvs-repository/Zope2/lib/python/Products/ZCatalog
In directory korak:/tmp/cvs-serv10837/lib/python/Products/ZCatalog
Modified Files:
Tag: RestrictedPythonBranch
ZCatalog.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 ZCatalog.py in package Zope2 --
--- ZCatalog.py 2001/04/25 20:26:37 1.85.10.1
+++ ZCatalog.py 2001/04/26 22:25:09 1.85.10.2
@@ -103,6 +103,7 @@
from Shared.DC.ZRDB.TM import TM
from AccessControl import getSecurityManager
from zLOG import LOG, ERROR
+from RestrictedPython.ZopeGuards import full_read_guard
StringType=type('')
@@ -753,8 +754,8 @@
class td(TemplateDict):
- 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)
def expr_match(ob, ed, c=InstanceDict, r=0):
e, md, push, pop=ed