[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/Container/Views/VFS - VFSContainerView.py:1.1.4.3
Jim Fulton
jim@zope.com
Fri, 7 Jun 2002 10:41:38 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Container/Views/VFS
In directory cvs.zope.org:/tmp/cvs-serv12187/lib/python/Zope/App/OFS/Container/Views/VFS
Modified Files:
Tag: Zope-3x-branch
VFSContainerView.py
Log Message:
Merging in Zope3InWonderland-branch, which implemented the following
proposals (see
http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/OldProposals):
- RenameAllowToRequire
- GroupClassRelatedDirectivesInClassDirective
- ViewInterfaceAndSimplification
- ConsistentUseOfSpacesAsDelimitersInZCMLAttributes
- TwoArgumentViewConstructors
- ImplementsInZCML
- SimpleViewCreationInZCML
- RemoveGetView
- ReplaceProtectWithAllow
- ViewMethodsAsViews
- MergeProtectionAndComponentDefinitions
There were also various security fixes resulting of better integration
of security with components.
=== Zope3/lib/python/Zope/App/OFS/Container/Views/VFS/VFSContainerView.py 1.1.4.2 => 1.1.4.3 ===
from Zope.ComponentArchitecture import getView
+from Zope.Publisher.VFS.IVFSView import IVFSView
from Zope.Publisher.VFS.IVFSPublisher import IVFSPublisher
from Zope.Publisher.VFS.IVFSDirectoryPublisher import IVFSDirectoryPublisher
@@ -28,6 +29,18 @@
from Zope.App.OFS.Content.File.File import File
from Zope.App.OFS.Content.Folder.Folder import Folder
+class XXXRequest:
+ def __init__(self, presentationType, skin='default'):
+ self.presentationType = presentationType
+ self.skin = skin
+
+ def getPresentationType(self):
+ return self.presentationType
+
+ def getPresentationSkin(self):
+ return self.skin
+
+
class VFSContainerView:
__implements__ = IVFSDirectoryPublisher
@@ -109,7 +122,7 @@
else:
obj = self._container.getObject(name)
- vfs_view = getView(obj, 'vfs', IVFSPublisher)
+ vfs_view = getView(obj, 'vfs', XXXRequest(IVFSView))
vfs_view.write(mode, instream, start)
def check_writable(self, name):