Commit 5d79a2e6 authored by Romain Courteaud's avatar Romain Courteaud

Remove some methods defined on BaseTool.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2903 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b1be2644
......@@ -31,15 +31,11 @@ from Products.CMFCore.utils import UniqueObject
from AccessControl import ClassSecurityInfo
from Globals import InitializeClass, DTMLFile
from Products.ERP5Type.Tool.BaseTool import BaseTool
from Products.CMFCore.PortalFolder import PortalFolder
from Products.ERP5Type.Document.Folder import Folder
from Products.ERP5Type import Permissions
from Products.ERP5 import _dtmldir
from zLOG import LOG
class DeliveryTool(UniqueObject, Folder, BaseTool):
class DeliveryTool(BaseTool):
"""
The DeliveryTool implements portal object
deliveries building policies.
......@@ -55,55 +51,9 @@ class DeliveryTool(UniqueObject, Folder, BaseTool):
# Declarative Security
security = ClassSecurityInfo()
# Filter content (ZMI))
def filtered_meta_types(self, user=None):
# Filters the list of available meta types.
#all = CMFCategoryTool.inheritedAttribute('filtered_meta_types')(self)
meta_types = []
for meta_type in self.all_meta_types():
if meta_type['name'] in self.allowed_types:
meta_types.append(meta_type)
return meta_types
# patch, so that we are able to add the BaseCategory
allowedContentTypes = BaseTool.allowedContentTypes
# patch, so that we are able to rename base categories
_verifyObjectPaste = PortalFolder._verifyObjectPaste
all_meta_types = BaseTool.all_meta_types
security.declareProtected(Permissions.View, 'hasContent')
def hasContent(self,id):
return id in self.objectIds()
#
# ZMI methods
#
manage_options = ( ( { 'label' : 'Overview'
, 'action' : 'manage_overview'
}
,
)
+ Folder.manage_options
)
security.declareProtected( Permissions.ManagePortal, 'manage_overview' )
manage_overview = DTMLFile( 'explainDeliveryTool', _dtmldir )
# Filter content (ZMI))
def __init__(self):
return Folder.__init__(self, DeliveryTool.id)
# Filter content (ZMI))
def filtered_meta_types(self, user=None):
# Filters the list of available meta types.
all = DeliveryTool.inheritedAttribute('filtered_meta_types')(self)
meta_types = []
for meta_type in self.all_meta_types():
if meta_type['name'] in self.allowed_types:
meta_types.append(meta_type)
return meta_types
security.declareProtected(Permissions.ModifyPortalContent, 'tic')
def tic(self):
"""
......
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