Commit 74edd20a authored by Yoshinori Okuji's avatar Yoshinori Okuji

Define its own reindexObjectSecurity.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2847 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 18147bc7
...@@ -301,8 +301,6 @@ be a problem).""" ...@@ -301,8 +301,6 @@ be a problem)."""
_edit = Base._edit _edit = Base._edit
_setPropValue = Base._setPropValue _setPropValue = Base._setPropValue
_propertyMap = Base._propertyMap # are there any others XXX ? _propertyMap = Base._propertyMap # are there any others XXX ?
security.declareProtected(Permissions.ModifyPortalContent, 'reindexObjectSecurity')
reindexObjectSecurity = Base.reindexObjectSecurity
# CPS patch circumvent # CPS patch circumvent
manage_renameObject = OriginalCopyContainer.manage_renameObject manage_renameObject = OriginalCopyContainer.manage_renameObject
...@@ -496,6 +494,20 @@ be a problem).""" ...@@ -496,6 +494,20 @@ be a problem)."""
""" """
return Base.reindexObject(self, *args, **kw) return Base.reindexObject(self, *args, **kw)
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, 'self = %r, self.getPath() = %r' % (self, self.getPath()))
self.reindexObject()
# Reindex contents
for c in self.objectValues():
if hasattr(aq_base(c), 'reindexObjectSecurity'):
c.reindexObjectSecurity()
security.declarePublic( 'recursiveReindexObject' ) security.declarePublic( 'recursiveReindexObject' )
def recursiveReindexObject(self, *args, **kw): def recursiveReindexObject(self, *args, **kw):
""" """
......
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