[Zope-Checkins] CVS: Zope2 - DA.py:1.101.6.1
shane@digicool.com
shane@digicool.com
Thu, 26 Apr 2001 18:25:12 -0400 (EDT)
Update of /cvs-repository/Zope2/lib/python/Shared/DC/ZRDB
In directory korak:/tmp/cvs-serv10837/lib/python/Shared/DC/ZRDB
Modified Files:
Tag: RestrictedPythonBranch
DA.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 DA.py in package Zope2 --
--- DA.py 2001/03/30 16:43:40 1.101
+++ DA.py 2001/04/26 22:25:10 1.101.6.1
@@ -110,6 +110,7 @@
from webdav.Lockable import ResourceLockedError
try: from IOBTree import Bucket
except: Bucket=lambda:{}
+from RestrictedPython.ZopeGuards import full_read_guard
class nvSQL(DocumentTemplate.HTML):
@@ -126,8 +127,8 @@
class SQL(ExtensionClass.Base, nvSQL):
# Validating SQL template for Zope SQL Methods.
- 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)
class DA(
Aqueduct.BaseQuery,Acquisition.Implicit,