X-Git-Url: https://scm.cri.mines-paristech.fr/git/GroupUserFolder.git/blobdiff_plain/8a8ab8d28efdd32e4316ea8d9242a36a594379cc..e9d14b6b5cc9cd4775c60cb340b5c4c787536fc3:/GroupDataTool.py diff --git a/GroupDataTool.py b/GroupDataTool.py index 9b05326..fc1bb02 100644 --- a/GroupDataTool.py +++ b/GroupDataTool.py @@ -37,15 +37,18 @@ from BTrees.OOBTree import OOBTree from ZPublisher.Converters import type_converters from Acquisition import aq_inner, aq_parent, aq_base from AccessControl import ClassSecurityInfo, Permissions, Unauthorized, getSecurityManager +from zope.interface import implements +from Products.CMFCore.interfaces import IActionProvider from Products.CMFCore.ActionProviderBase import ActionProviderBase + # BBB CMF < 1.5 try: from Products.CMFCore.permissions import ManagePortal except ImportError: from Products.CMFCore.CMFCorePermissions import ManagePortal -from Products.CMFCore.MemberDataTool import CleanupTemp +# from Products.CMFCore.MemberDataTool import CleanupTemp from interfaces.portal_groupdata import portal_groupdata as IGroupDataTool from interfaces.portal_groupdata import GroupData as IGroupData @@ -61,7 +64,8 @@ class GroupDataTool (UniqueObject, SimpleItem, PropertyManager, ActionProviderBa """ This tool wraps group objects, allowing transparent access to properties. """ # The latter will work only with Plone 1.1 => hence, the if - __implements__ = (IGroupDataTool, ActionProviderBase.__implements__) + implements(IGroupDataTool, IActionProvider) + # __implements__ = (IGroupDataTool, ActionProviderBase.__implements__) id = 'portal_groupdata' meta_type = 'CMF Group Data Tool' @@ -112,9 +116,10 @@ class GroupDataTool (UniqueObject, SimpleItem, PropertyManager, ActionProviderBa portal_group = GroupData(base, id) if temps is None: self._v_temps = {id:portal_group} - if hasattr(self, 'REQUEST'): - # No REQUEST during tests. - self.REQUEST._hold(CleanupTemp(self)) +# XXX ClenupTemp doesn't exits +# if hasattr(self, 'REQUEST'): +# # No REQUEST during tests. +# self.REQUEST._hold(CleanupTemp(self)) else: temps[id] = portal_group else: