[CMF-checkins] CVS: CMF - FSDTMLMethod.py:1.6

shane@digicool.com shane@digicool.com
Thu, 21 Jun 2001 16:04:31 -0400 (EDT)


Update of /cvs-repository/CMF/CMFCore
In directory korak.digicool.com:/tmp/cvs-serv32664

Modified Files:
	FSDTMLMethod.py 
Log Message:
Used the newer Zope 2.4.x method of implementing restricted DTML.



--- Updated File FSDTMLMethod.py in package CMF --
--- FSDTMLMethod.py	2001/04/30 19:23:48	1.5
+++ FSDTMLMethod.py	2001/06/21 20:04:30	1.6
@@ -97,11 +97,13 @@
 from DirectoryView import registerFileExtension, registerMetaType, expandpath
 from FSObject import FSObject
 try:
-    from AccessControl import full_read_guard
-except ImportError: pass
+    # Zope 2.4.x
+    from AccessControl.DTML import RestrictedDTML
+except ImportError:
+    class RestrictedDTML: pass
 
 
-class FSDTMLMethod(FSObject, Globals.HTML):
+class FSDTMLMethod(RestrictedDTML, FSObject, Globals.HTML):
     """FSDTMLMethods act like DTML methods but are not directly
     modifiable from the management interface."""
 
@@ -196,9 +198,6 @@
     # Zope 2.3.x way:
     def validate(self, inst, parent, name, value, md):
         return getSecurityManager().validate(inst, parent, name, value)
-    # Zope 2.4.x way:
-    def read_guard(self, ob):
-        return full_read_guard(ob)
 
     security.declareProtected(FTPAccess, 'manage_FTPget')
     security.declareProtected(ViewManagementScreens, 'PrincipiaSearchSource',