[Checkins] SVN: Products.CMFCore/trunk/Products/CMFCore/ActionProviderBase.py - the Actions tab in the ZMI can only deal with old-style actions

Jens Vagelpohl jens at dataflake.org
Wed Sep 24 09:24:24 EDT 2008


Log message for revision 91427:
  - the Actions tab in the ZMI can only deal with old-style actions 
    at the moment, so we need to filter out any new-style actions or
    add actions.
  

Changed:
  U   Products.CMFCore/trunk/Products/CMFCore/ActionProviderBase.py

-=-
Modified: Products.CMFCore/trunk/Products/CMFCore/ActionProviderBase.py
===================================================================
--- Products.CMFCore/trunk/Products/CMFCore/ActionProviderBase.py	2008-09-24 13:02:14 UTC (rev 91426)
+++ Products.CMFCore/trunk/Products/CMFCore/ActionProviderBase.py	2008-09-24 13:24:23 UTC (rev 91427)
@@ -147,7 +147,12 @@
 
         """ Show the 'Actions' management tab.
         """
-        actions = [ ai.getMapping() for ai in self.listActions() ]
+        actions = []
+        for action in self.listActions():
+            # The Actions tab currently only shows old-style actions,
+            # so we need to weed out everything else.
+            if getattr(action, 'getMapping', None) is not None:
+                actions.append(action.getMapping())
 
         # possible_permissions is in AccessControl.Role.RoleManager.
         pp = self.possible_permissions()



More information about the Checkins mailing list