[CMF-checkins] CVS: Products/CMFCore - CMFCatalogAware.py:1.21.2.11

Florent Guillaume fg at nuxeo.com
Fri Jun 3 13:12:11 EDT 2005


Update of /cvs-repository/Products/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv18098/CMFCore

Modified Files:
      Tag: CMF-1_5-branch
	CMFCatalogAware.py 
Log Message:
CMFCatalogAware: allow easy subclassing of the "security indexes" that
are reindexed by reindexObjectSecurity(), through the attribute
_cmf_security_indexes.



=== Products/CMFCore/CMFCatalogAware.py 1.21.2.10 => 1.21.2.11 ===
--- Products/CMFCore/CMFCatalogAware.py:1.21.2.10	Sun Apr 24 20:40:11 2005
+++ Products/CMFCore/CMFCatalogAware.py	Fri Jun  3 13:11:41 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