[Zope-Checkins] CVS: Releases/Zope/lib/python/OFS - DTMLMethod.py:1.69

Matthew T. Kromer matt@zope.com
Thu, 4 Oct 2001 11:18:22 -0400


Update of /cvs-repository/Releases/Zope/lib/python/OFS
In directory cvs.zope.org:/tmp/cvs-serv13560

Modified Files:
	DTMLMethod.py 
Log Message:
Important fix!  The DTMLValidate speedup to security machinery was marking
objects as changed when OFS.DTMLMethod inserted DTMLValidate as self.validate.
This sidesteps the problem by modifying the object's __dict__ instead.


=== Releases/Zope/lib/python/OFS/DTMLMethod.py 1.68 => 1.69 ===
         security=getSecurityManager()
         security.addContext(self)
-        self.validate = security.DTMLValidate
+        self.__dict__['validate'] = security.DTMLValidate
         try:
         
             if client is None:
@@ -200,7 +200,7 @@
 
         finally:
             security.removeContext(self)
-            del self.validate
+            del self.__dict__['validate']
 
         have_key=RESPONSE.headers.has_key
         if not (have_key('content-type') or have_key('Content-Type')):