Commit 511b462e authored by Vincent Pelletier's avatar Vincent Pelletier

Use a less intrusive workaround (see commit 21271).


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22632 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 92e5e611
...@@ -37,7 +37,7 @@ from Products.CMFCore.CatalogTool import IndexableObjectWrapper as CMFCoreIndexa ...@@ -37,7 +37,7 @@ from Products.CMFCore.CatalogTool import IndexableObjectWrapper as CMFCoreIndexa
from Products.CMFCore.utils import UniqueObject, _checkPermission, _getAuthenticatedUser, getToolByName from Products.CMFCore.utils import UniqueObject, _checkPermission, _getAuthenticatedUser, getToolByName
from Products.CMFCore.utils import _mergedLocalRoles from Products.CMFCore.utils import _mergedLocalRoles
from Globals import InitializeClass, DTMLFile, package_home from Globals import InitializeClass, DTMLFile, package_home
from Acquisition import aq_base, aq_inner, aq_parent from Acquisition import aq_base, aq_inner, aq_parent, ImplicitAcquisitionWrapper
from DateTime.DateTime import DateTime from DateTime.DateTime import DateTime
from Products.CMFActivity.ActiveObject import ActiveObject from Products.CMFActivity.ActiveObject import ActiveObject
from Products.ERP5Type.TransactionalVariable import getTransactionalVariable from Products.ERP5Type.TransactionalVariable import getTransactionalVariable
...@@ -81,7 +81,7 @@ except ImportError: ...@@ -81,7 +81,7 @@ except ImportError:
pass pass
from Persistence import Persistent from Persistence import Persistent
from Acquisition import Implicit, Explicit from Acquisition import Implicit
def getSecurityProduct(acl_users): def getSecurityProduct(acl_users):
"""returns the security used by the user folder passed. """returns the security used by the user folder passed.
...@@ -93,15 +93,7 @@ def getSecurityProduct(acl_users): ...@@ -93,15 +93,7 @@ def getSecurityProduct(acl_users):
return SECURITY_USING_NUX_USER_GROUPS return SECURITY_USING_NUX_USER_GROUPS
class IndexableObjectWrapper(CMFCoreIndexableObjectWrapper, Explicit): class IndexableObjectWrapper(CMFCoreIndexableObjectWrapper):
def __getattr__(self, name):
vars = self.__vars
if vars.has_key(name):
return vars[name]
ob = aq_inner(self.__ob)
return getattr(ob, name)
def __setattr__(self, name, value): def __setattr__(self, name, value):
# We need to update the uid during the cataloging process # We need to update the uid during the cataloging process
...@@ -754,7 +746,8 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject): ...@@ -754,7 +746,8 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject):
if predicate_property_dict is not None: if predicate_property_dict is not None:
vars['predicate_property_dict'] = predicate_property_dict vars['predicate_property_dict'] = predicate_property_dict
vars['security_uid'] = security_uid vars['security_uid'] = security_uid
return w.__of__(object.aq_parent)
return ImplicitAcquisitionWrapper(w, aq_parent(document_object))
security.declarePrivate('reindexObject') security.declarePrivate('reindexObject')
def reindexObject(self, object, idxs=None, sql_catalog_id=None,**kw): def reindexObject(self, object, idxs=None, sql_catalog_id=None,**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