[Checkins] SVN: Products.CMFCore/trunk/Products/CMFCore/ Made calls to reindexObjectSecurity in the membership tool conditional after the CMFCatalogAware refactoring.
Hanno Schlichting
hannosch at hannosch.eu
Fri Sep 4 19:04:10 EDT 2009
Log message for revision 103563:
Made calls to reindexObjectSecurity in the membership tool conditional after the CMFCatalogAware refactoring.
Changed:
U Products.CMFCore/trunk/Products/CMFCore/CHANGES.txt
U Products.CMFCore/trunk/Products/CMFCore/MembershipTool.py
-=-
Modified: Products.CMFCore/trunk/Products/CMFCore/CHANGES.txt
===================================================================
--- Products.CMFCore/trunk/Products/CMFCore/CHANGES.txt 2009-09-04 22:58:29 UTC (rev 103562)
+++ Products.CMFCore/trunk/Products/CMFCore/CHANGES.txt 2009-09-04 23:04:10 UTC (rev 103563)
@@ -4,6 +4,9 @@
2.2.0 (unreleased)
------------------
+- Made calls to reindexObjectSecurity in the membership tool conditional
+ after the CMFCatalogAware refactoring.
+
- PortalFolder: Removed unused ICatalogAware and IWorkflowAware methods.
- CMFCatalogAware: Split up CMFCatalogAware mixin.
Modified: Products.CMFCore/trunk/Products/CMFCore/MembershipTool.py
===================================================================
--- Products.CMFCore/trunk/Products/CMFCore/MembershipTool.py 2009-09-04 22:58:29 UTC (rev 103562)
+++ Products.CMFCore/trunk/Products/CMFCore/MembershipTool.py 2009-09-04 23:04:10 UTC (rev 103563)
@@ -445,10 +445,7 @@
roles.append( member_role )
obj.manage_setLocalRoles( member_id, roles )
- if reindex:
- # It is assumed that all objects have the method
- # reindexObjectSecurity, which is in CMFCatalogAware and
- # thus PortalContent and PortalFolder.
+ if reindex and hasattr(aq_base(obj), 'reindexObjectSecurity'):
obj.reindexObjectSecurity()
security.declareProtected(View, 'deleteLocalRoles')
@@ -467,7 +464,7 @@
for subobj in obj.contentValues():
self.deleteLocalRoles(subobj, member_ids, 0, 1)
- if reindex:
+ if reindex and hasattr(aq_base(obj), 'reindexObjectSecurity'):
# reindexObjectSecurity is always recursive
obj.reindexObjectSecurity()
More information about the checkins
mailing list