[Zope-Checkins] CVS: Zope3/lib/python/Zope/Publisher/VFS - IVFSCredentials.py:1.1.2.2 IVFSDirectoryPublisher.py:1.1.2.4 IVFSFilePublisher.py:1.1.2.3 VFSRequest.py:1.1.2.6 InfoPublisher.py:NONE
Shane Hathaway
shane@cvs.zope.org
Fri, 12 Apr 2002 16:52:27 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/Publisher/VFS
In directory cvs.zope.org:/tmp/cvs-serv9268/VFS
Modified Files:
Tag: Zope3-Server-Branch
IVFSCredentials.py IVFSDirectoryPublisher.py
IVFSFilePublisher.py VFSRequest.py
Removed Files:
Tag: Zope3-Server-Branch
InfoPublisher.py
Log Message:
Minor updates to comments. Also moved the check_writable method to
IVFSDirectoryPublisher for now.
=== Zope3/lib/python/Zope/Publisher/VFS/IVFSCredentials.py 1.1.2.1 => 1.1.2.2 ===
class IVFSCredentials(Interface):
- # XXX Eventially this will be a different method
+ # XXX Eventually this will be a different method
def _authUserPW():
"""Return (login, password) if there are basic credentials;
return None if there aren't."""
=== Zope3/lib/python/Zope/Publisher/VFS/IVFSDirectoryPublisher.py 1.1.2.3 => 1.1.2.4 ===
"""
- def mkdir(name, mode=777):
+ def mkdir(name, mode=0777):
"""Create a container with name in this object.
"""
@@ -49,4 +49,8 @@
"""Write a file to the container. If the object does not exist,
inspect the content and the file name to create the right object
type.
+ """
+
+ def check_writable(name):
+ """Check whether we can write to a subobject.
"""
=== Zope3/lib/python/Zope/Publisher/VFS/IVFSFilePublisher.py 1.1.2.2 => 1.1.2.3 ===
"""Write data specified in instream to object.
"""
-
- def check_writable(mode):
- """Check whether we can write to this object.
- """
=== Zope3/lib/python/Zope/Publisher/VFS/VFSRequest.py 1.1.2.5 => 1.1.2.6 ===
def _authUserPW(self):
'See Zope.Publisher.VFS.IVFSCredentials.IVFSCredentials'
+ # XXX This is wrong. Instead of _authUserPW() there should
+ # be a method of all requests called getCredentials() which
+ # returns an ICredentials instance.
credentials = self._environ['credentials']
return credentials.getUserName(), credentials.getPassword()
@@ -83,12 +86,9 @@
else:
self._endswithslash = 0
- if path.startswith('/'):
- path = path[1:] # XXX Why? Not sure
-
clean = []
for item in path.split('/'):
- if item == '.':
+ if not item or item == '.':
continue
elif item == '..':
try: del clean[-1]
=== Removed File Zope3/lib/python/Zope/Publisher/VFS/InfoPublisher.py ===