Commit 91b98355 authored by Tristan Cavelier's avatar Tristan Cavelier

immediateReindexObject: use super user to reindex script

parent 3af46cdf
...@@ -85,7 +85,7 @@ from Products.ERP5Type.Accessor.Accessor import Accessor as Method ...@@ -85,7 +85,7 @@ from Products.ERP5Type.Accessor.Accessor import Accessor as Method
from Products.ERP5Type.Accessor.TypeDefinition import asDate from Products.ERP5Type.Accessor.TypeDefinition import asDate
from Products.ERP5Type.Message import Message from Products.ERP5Type.Message import Message
from Products.ERP5Type.ConsistencyMessage import ConsistencyMessage from Products.ERP5Type.ConsistencyMessage import ConsistencyMessage
from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod, super_user
from zope.interface import classImplementsOnly, implementedBy from zope.interface import classImplementsOnly, implementedBy
...@@ -2758,6 +2758,7 @@ class Base( CopyContainer, ...@@ -2758,6 +2758,7 @@ class Base( CopyContainer,
root_indexable = int(getattr(self.getPortalObject(),'isIndexable',1)) root_indexable = int(getattr(self.getPortalObject(),'isIndexable',1))
if self.isIndexable and root_indexable: if self.isIndexable and root_indexable:
#LOG("immediateReindexObject",0,self.getRelativeUrl()) #LOG("immediateReindexObject",0,self.getRelativeUrl())
with super_user():
PortalContent.reindexObject(self, *args, **kw) PortalContent.reindexObject(self, *args, **kw)
else: else:
pass pass
......
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