[z3-checkins] r5859 - z3/Five/trunk

dreamcatcher at codespeak.net dreamcatcher at codespeak.net
Tue Aug 3 15:23:46 MEST 2004


Author: dreamcatcher
Date: Tue Aug  3 15:23:45 2004
New Revision: 5859

Modified:
   z3/Five/trunk/CHANGES.txt
   z3/Five/trunk/browserconfigure.py
Log:
VPT is of the Trusted kind now

Modified: z3/Five/trunk/CHANGES.txt
==============================================================================
--- z3/Five/trunk/CHANGES.txt	(original)
+++ z3/Five/trunk/CHANGES.txt	Tue Aug  3 15:23:45 2004
@@ -22,8 +22,6 @@
 - browser:page now correctly handles the allow_attributes and protects
   the named attributes on the view with the same permission used for
   the view (this sounds a bit strange, doesn't it?)
-- ViewPageTemplateFile 'modules' uses zope2 SecureModuleImporter now
-  (eg: browser:page)
 - zopeconf.py will try to find etc/zope.conf on INSTANCE_HOME
 
 Five 0.1

Modified: z3/Five/trunk/browserconfigure.py
==============================================================================
--- z3/Five/trunk/browserconfigure.py	(original)
+++ z3/Five/trunk/browserconfigure.py	Tue Aug  3 15:23:45 2004
@@ -303,13 +303,9 @@
         meth = getattr(self, attr)
         return meth(*args, **kw)
 
-class ViewPageTemplateFile(VPT):
-
-    def pt_getContext(self, instance, request, **kw):
-        _super = super(ViewPageTemplateFile, self)
-        ns = _super.pt_getContext(instance, request, **kw)
-        ns['modules'] = SecureModuleImporter
-        return ns
+# VPT is of the Trusted kind, so it allows access to sys.modules
+# directly and allows importing of not-yet imported modules.
+class ViewPageTemplateFile(VPT): pass
 
 class ViewMixinForTemplates(BrowserView):
 


More information about the z3-checkins mailing list