Commit fadcf40e authored by Amos Latteier's avatar Amos Latteier

Added simple minded ownership detection to FTP long directory listings, by...

Added simple minded ownership detection to FTP long directory listings, by looking for users with local roles of 'Owner'.
parent 23d56763
...@@ -84,9 +84,9 @@ ...@@ -84,9 +84,9 @@
############################################################################## ##############################################################################
__doc__="""Object Manager __doc__="""Object Manager
$Id: ObjectManager.py,v 1.72 1999/05/19 16:19:16 klm Exp $""" $Id: ObjectManager.py,v 1.73 1999/06/18 00:32:39 amos Exp $"""
__version__='$Revision: 1.72 $'[11:-2] __version__='$Revision: 1.73 $'[11:-2]
import App.Management, Acquisition, App.Undo, Globals, CopySupport import App.Management, Acquisition, App.Undo, Globals, CopySupport
import os, App.FactoryDispatcher, ts_regex, Products import os, App.FactoryDispatcher, ts_regex, Products
...@@ -485,7 +485,14 @@ class ObjectManager( ...@@ -485,7 +485,14 @@ class ObjectManager(
self.manage_FTPlist.__roles__): self.manage_FTPlist.__roles__):
mode=mode | 0007 mode=mode | 0007
mtime=self.bobobase_modification_time().timeTime() mtime=self.bobobase_modification_time().timeTime()
return marshal.dumps((mode,0,0,1,0,0,0,mtime,mtime,mtime)) # get owner and group
owner=group='Zope'
for r in self.get_local_roles():
user,roles=r
if 'Owner' in roles:
owner=user
break
return marshal.dumps((mode,0,0,1,owner,group,0,mtime,mtime,mtime))
def __getitem__(self, key): def __getitem__(self, key):
......
...@@ -89,8 +89,8 @@ Aqueduct database adapters, etc. ...@@ -89,8 +89,8 @@ Aqueduct database adapters, etc.
This module can also be used as a simple template for implementing new This module can also be used as a simple template for implementing new
item types. item types.
$Id: SimpleItem.py,v 1.55 1999/06/08 16:11:12 klm Exp $''' $Id: SimpleItem.py,v 1.56 1999/06/18 00:32:39 amos Exp $'''
__version__='$Revision: 1.55 $'[11:-2] __version__='$Revision: 1.56 $'[11:-2]
import regex, sys, Globals, App.Management, Acquisition import regex, sys, Globals, App.Management, Acquisition
from webdav.Resource import Resource from webdav.Resource import Resource
...@@ -285,7 +285,14 @@ class Item(Base, Resource, CopySource, App.Management.Tabs): ...@@ -285,7 +285,14 @@ class Item(Base, Resource, CopySource, App.Management.Tabs):
size=0 size=0
# get modification time # get modification time
mtime=self.bobobase_modification_time().timeTime() mtime=self.bobobase_modification_time().timeTime()
return marshal.dumps((mode,0,0,1,0,0,size,mtime,mtime,mtime)) # get owner and group
owner=group='Zope'
for r in self.get_local_roles():
user,roles=r
if 'Owner' in roles:
owner=user
break
return marshal.dumps((mode,0,0,1,owner,group,size,mtime,mtime,mtime))
def manage_FTPlist(self,REQUEST): def manage_FTPlist(self,REQUEST):
"""Directory listing for FTP. In the case of non-Foldoid objects, """Directory listing for FTP. In the case of non-Foldoid objects,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment