From f5c7fc2794d9edbf0f9bffd5811b3cbf33f68afc Mon Sep 17 00:00:00 2001 From: Jean-Paul Smets <jp@nexedi.com> Date: Thu, 5 Jan 2006 22:04:26 +0000 Subject: [PATCH] fixed webdav support git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5033 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/Document/File.py | 58 ++++------------------------------- 1 file changed, 6 insertions(+), 52 deletions(-) diff --git a/product/ERP5/Document/File.py b/product/ERP5/Document/File.py index 337ca36e9a..673318e196 100755 --- a/product/ERP5/Document/File.py +++ b/product/ERP5/Document/File.py @@ -59,6 +59,9 @@ class File(Base, CMFFile): security = ClassSecurityInfo() security.declareObjectProtected(Permissions.View) + # Default global values + content_type = '' # Required for WebDAV support (default value) + # Declarative properties property_sheets = ( PropertySheet.Base , PropertySheet.CategoryCore @@ -68,57 +71,6 @@ class File(Base, CMFFile): # Declarative interfaces #__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 security.declarePrivate( '_edit' ) def _edit(self, **kw): @@ -153,8 +105,10 @@ or 'HTML'. Text can be automatically translated through the use of\ CMFFile.manage_beforeDelete(self, item, container) # DAV Support + index_html = CMFFile.index_html PUT = CMFFile.PUT + security.declareProtected('FTP access', 'manage_FTPget', 'manage_FTPstat', 'manage_FTPlist') manage_FTPget = CMFFile.manage_FTPget manage_FTPlist = CMFFile.manage_FTPlist manage_FTPstat = CMFFile.manage_FTPstat - + -- 2.30.9