Commit c23230d5 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Define recursiveReindexObject as an alias to reindexObject.

Override reindexObjectSecurity to reindex sub-objects with recursiveReindexObject.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2831 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 223f83c3
......@@ -192,7 +192,7 @@ def initializePortalTypeDynamicProperties(self, klass, ptype, recursive=0):
# We should now make sure workflow methods are defined
# and also make sure simulation state is defined
portal_workflow = getToolByName(self, 'portal_workflow')
#LOG('getWorkflowsFor', 0, str(portal_workflow.getWorkflowsFor(self)))
#LOG('getWorkflowsFor', 0, str((self, [wf.id for wf in portal_workflow.getWorkflowsFor(self)])))
for wf in portal_workflow.getWorkflowsFor(self):
wf_id = wf.id
try:
......@@ -1652,6 +1652,19 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ):
if self.isIndexable and root_indexable:
self.activate(**kw).immediateReindexObject(*args, **kw)
security.declarePublic('recursiveReindexObject')
recursiveReindexObject = reindexObject
security.declareProtected(Permissions.ModifyPortalContent, 'reindexObjectSecurity')
def reindexObjectSecurity(self):
"""
Reindex security-related indexes on the object
(and its descendants).
"""
# In ERP5, simply reindex all objects.
#LOG('reindexObjectSecurity', 0, 'called')
self.recursiveReindexObject()
def immediateQueueCataloggedObject(self, *args, **kw):
if self.isIndexable:
catalog_tool = getToolByName(self, 'portal_catalog', 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