[CMF-checkins] CVS: CMF/CMFCore - WorkflowTool.py:1.38
Florent Guillaume
fg@nuxeo.com
Fri, 14 Mar 2003 14:12:10 -0500
Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv13826/CMFCore
Modified Files:
WorkflowTool.py
Log Message:
Ensure that the security attributes are reindexed on all subobjects too
when a folderish object changes state in the workflow (Collector #115).
=== CMF/CMFCore/WorkflowTool.py 1.37 => 1.38 ===
--- CMF/CMFCore/WorkflowTool.py:1.37 Thu Feb 13 03:31:01 2003
+++ CMF/CMFCore/WorkflowTool.py Fri Mar 14 14:11:39 2003
@@ -689,6 +689,8 @@
def _reindexWorkflowVariables(self, ob):
""" Reindex the variables that the workflow may have changed.
+
+ Also reindexes the security.
"""
if not self._default_cataloging:
return
@@ -696,9 +698,12 @@
if hasattr(aq_base(ob), 'reindexObject'):
# XXX We only need the keys here, no need to compute values.
mapping = self.getCatalogVariablesFor(ob) or {}
- mapping['allowedRolesAndUsers'] = None
vars = mapping.keys()
ob.reindexObject(idxs=vars)
+
+ # Reindex security of subobjects.
+ if hasattr(aq_base(ob), 'reindexObjectSecurity'):
+ ob.reindexObjectSecurity()
InitializeClass(WorkflowTool)