Commit 37b80134 authored by Ayush Tiwari's avatar Ayush Tiwari

erp5_catalog: Change inheritence order to restrict use of properties from ZCatalog

parent b684e8f2
...@@ -305,7 +305,7 @@ class RelatedBaseCategory(Method): ...@@ -305,7 +305,7 @@ class RelatedBaseCategory(Method):
'RELATED_QUERY_SEPARATOR': RELATED_QUERY_SEPARATOR, 'RELATED_QUERY_SEPARATOR': RELATED_QUERY_SEPARATOR,
} }
class CatalogTool (ZCatalog, CMFCoreCatalogTool, BaseTool): class CatalogTool (BaseTool, ZCatalog, CMFCoreCatalogTool):
""" """
This is a ZSQLCatalog that filters catalog queries. This is a ZSQLCatalog that filters catalog queries.
It is based on ZSQLCatalog It is based on ZSQLCatalog
...@@ -315,6 +315,8 @@ class CatalogTool (ZCatalog, CMFCoreCatalogTool, BaseTool): ...@@ -315,6 +315,8 @@ class CatalogTool (ZCatalog, CMFCoreCatalogTool, BaseTool):
meta_type = 'Catalog Tool' meta_type = 'Catalog Tool'
portal_type = 'Catalog Tool' portal_type = 'Catalog Tool'
allowed_types = ('Catalog',) allowed_types = ('Catalog',)
# Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
default_result_limit = None default_result_limit = None
...@@ -327,6 +329,7 @@ class CatalogTool (ZCatalog, CMFCoreCatalogTool, BaseTool): ...@@ -327,6 +329,7 @@ class CatalogTool (ZCatalog, CMFCoreCatalogTool, BaseTool):
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.SimpleItem , PropertySheet.SimpleItem
, PropertySheet.Folder , PropertySheet.Folder
, PropertySheet.CategoryCore
, PropertySheet.CatalogTool , PropertySheet.CatalogTool
) )
...@@ -345,8 +348,8 @@ class CatalogTool (ZCatalog, CMFCoreCatalogTool, BaseTool): ...@@ -345,8 +348,8 @@ class CatalogTool (ZCatalog, CMFCoreCatalogTool, BaseTool):
objectValues = BaseTool.objectValues objectValues = BaseTool.objectValues
def __init__(self): def __init__(self):
ZCatalog.__init__(self, self.getId()) ZCatalog.__init__(self, self.getId())
BaseTool.__init__(self, self.getId()) BaseTool.__init__(self, id)
# Filter content (ZMI)) # Filter content (ZMI))
def filtered_meta_types(self, user=None): def filtered_meta_types(self, user=None):
......
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