[CMF-checkins] CVS: Products/CMFCore - CMFCatalogAware.py:1.30
Florent Guillaume
fg at nuxeo.com
Fri Jun 3 13:32:03 EDT 2005
Update of /cvs-repository/Products/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv23714/CMFCore
Modified Files:
CMFCatalogAware.py
Log Message:
Merge from 1.5 branch:
CMFCatalogAware: allow easy subclassing of the "security indexes" that
are reindexed by reindexObjectSecurity(), through the attribute
_cmf_security_indexes.
=== Products/CMFCore/CMFCatalogAware.py 1.29 => 1.30 ===
--- Products/CMFCore/CMFCatalogAware.py:1.29 Fri Apr 22 14:44:48 2005
+++ Products/CMFCore/CMFCatalogAware.py Fri Jun 3 13:31:33 2005
@@ -76,6 +76,8 @@
if catalog is not None:
catalog.reindexObject(self, idxs=idxs)
+ _cmf_security_indexes = ('allowedRolesAndUsers',)
+
security.declareProtected(ModifyPortalContent, 'reindexObjectSecurity')
def reindexObjectSecurity(self, skip_self=False):
"""
@@ -103,13 +105,13 @@
"Cannot get %s from catalog" % brain_path)
continue
s = getattr(ob, '_p_changed', 0)
- catalog.reindexObject(ob, idxs=['allowedRolesAndUsers'],
+ catalog.reindexObject(ob, idxs=self._cmf_security_indexes,
update_metadata=0)
if s is None: ob._p_deactivate()
# Reindex the object itself in here if not explicitly
# asked to not to
if not skip_self:
- catalog.reindexObject(self, idxs=['allowedRolesAndUsers'],
+ catalog.reindexObject(self, idxs=self._cmf_security_indexes,
update_metadata=0)
# Workflow methods
More information about the CMF-checkins
mailing list