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,7 +2758,8 @@ class Base( CopyContainer, ...@@ -2758,7 +2758,8 @@ 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())
PortalContent.reindexObject(self, *args, **kw) with super_user():
PortalContent.reindexObject(self, *args, **kw)
else: else:
pass pass
#LOG("No reindex now",0,self.getRelativeUrl()) #LOG("No reindex now",0,self.getRelativeUrl())
......
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