Commit f5c7fc27 authored by Jean-Paul Smets's avatar Jean-Paul Smets

fixed webdav support


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5033 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0f53fe50
...@@ -59,6 +59,9 @@ class File(Base, CMFFile): ...@@ -59,6 +59,9 @@ class File(Base, CMFFile):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View) security.declareObjectProtected(Permissions.View)
# Default global values
content_type = '' # Required for WebDAV support (default value)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.CategoryCore , PropertySheet.CategoryCore
...@@ -68,57 +71,6 @@ class File(Base, CMFFile): ...@@ -68,57 +71,6 @@ class File(Base, CMFFile):
# Declarative interfaces # Declarative interfaces
#__implements__ = ( , ) #__implements__ = ( , )
# CMF Factory Type Information
factory_type_information = \
{ 'id' : portal_type
, 'meta_type' : meta_type
, 'description' : """\
Document can contain text that can be formatted using 'Structured Text'.\
or 'HTML'. Text can be automatically translated through the use of\
'message catalogs' and provided to the user in multilple languages."""
, 'icon' : 'file_icon.gif'
, 'product' : 'ERP5'
, 'factory' : 'addFile'
, 'immediate_view' : 'file_view'
, 'actions' :
( { 'id' : 'view'
, 'name' : 'View'
, 'category' : 'object_view'
, 'action' : 'file_view'
, 'permissions' : (
Permissions.View, )
}
, { 'id' : 'print'
, 'name' : 'Print'
, 'category' : 'object_print'
, 'action' : 'file_print'
, 'permissions' : (
Permissions.View, )
}
, { 'id' : 'metadata'
, 'name' : 'Metadata'
, 'category' : 'object_view'
, 'action' : 'metadata_edit'
, 'permissions' : (
Permissions.View, )
}
, { 'id' : 'download'
, 'name' : 'Download'
, 'category' : 'object_action'
, 'action' : 'download'
, 'permissions' : (
Permissions.View, )
}
, { 'id' : 'translate'
, 'name' : 'Translate'
, 'category' : 'object_action'
, 'action' : 'translation_template_view'
, 'permissions' : (
Permissions.TranslateContent, )
}
)
}
### Special edit method ### Special edit method
security.declarePrivate( '_edit' ) security.declarePrivate( '_edit' )
def _edit(self, **kw): def _edit(self, **kw):
...@@ -153,7 +105,9 @@ or 'HTML'. Text can be automatically translated through the use of\ ...@@ -153,7 +105,9 @@ or 'HTML'. Text can be automatically translated through the use of\
CMFFile.manage_beforeDelete(self, item, container) CMFFile.manage_beforeDelete(self, item, container)
# DAV Support # DAV Support
index_html = CMFFile.index_html
PUT = CMFFile.PUT PUT = CMFFile.PUT
security.declareProtected('FTP access', 'manage_FTPget', 'manage_FTPstat', 'manage_FTPlist')
manage_FTPget = CMFFile.manage_FTPget manage_FTPget = CMFFile.manage_FTPget
manage_FTPlist = CMFFile.manage_FTPlist manage_FTPlist = CMFFile.manage_FTPlist
manage_FTPstat = CMFFile.manage_FTPstat manage_FTPstat = CMFFile.manage_FTPstat
......
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