Commit 5ef8c6f5 authored by Sebastien Robin's avatar Sebastien Robin

we are now allowed to add a BaseCategory


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2261 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 26c04d38
...@@ -30,12 +30,17 @@ ...@@ -30,12 +30,17 @@
ERP portal_categories tool. ERP portal_categories tool.
""" """
from Products.CMFCategory.CategoryTool import * from Products.CMFCategory.CategoryTool import CategoryTool as CMFCategoryTool
from Products.ERP5Type.Tool.BaseTool import BaseTool from Products.ERP5Type.Tool.BaseTool import BaseTool
from Products.BTreeFolder2.BTreeFolder2 import BTreeFolder2
from AccessControl import ClassSecurityInfo
from Globals import InitializeClass, DTMLFile, PersistentMapping
from OFS.Folder import Folder as OFS_Folder
from Products.ERP5Type import Permissions
from zLOG import LOG from zLOG import LOG
class CategoryTool( CategoryTool, BaseTool ): class CategoryTool( CMFCategoryTool, BaseTool ):
""" """
The CategoryTool object is the placeholder for all methods The CategoryTool object is the placeholder for all methods
and algorithms related to categories and relations in ERP5. and algorithms related to categories and relations in ERP5.
...@@ -59,6 +64,9 @@ class CategoryTool( CategoryTool, BaseTool ): ...@@ -59,6 +64,9 @@ class CategoryTool( CategoryTool, BaseTool ):
meta_types.append(meta_type) meta_types.append(meta_type)
return meta_types return meta_types
# patch, so that we are able to add the BaseCategory
allowedContentTypes = BaseTool.allowedContentTypes
security.declareProtected(Permissions.AccessContentsInformation, 'getCategoryParentUidList') security.declareProtected(Permissions.AccessContentsInformation, 'getCategoryParentUidList')
def getCategoryParentUidList(self, relative_url, base_category = None, strict=0): def getCategoryParentUidList(self, relative_url, base_category = None, strict=0):
""" """
......
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