[Checkins] SVN: Products.DCWorkflow/trunk/Products/DCWorkflow/ - Workflow UI: Remove ancient cruft to accommodate the proprietary

Jens Vagelpohl jens at dataflake.org
Fri Oct 10 12:18:00 EDT 2008


Log message for revision 91990:
  - Workflow UI: Remove ancient cruft to accommodate the proprietary
    (and long dead) base_cms product.
  

Changed:
  U   Products.DCWorkflow/trunk/Products/DCWorkflow/CHANGES.txt
  U   Products.DCWorkflow/trunk/Products/DCWorkflow/WorkflowUIMixin.py

-=-
Modified: Products.DCWorkflow/trunk/Products/DCWorkflow/CHANGES.txt
===================================================================
--- Products.DCWorkflow/trunk/Products/DCWorkflow/CHANGES.txt	2008-10-10 16:04:10 UTC (rev 91989)
+++ Products.DCWorkflow/trunk/Products/DCWorkflow/CHANGES.txt	2008-10-10 16:17:59 UTC (rev 91990)
@@ -4,6 +4,9 @@
 2.2.0 (unreleased)
 ------------------
 
+- Workflow UI: Remove ancient cruft to accommodate the proprietary
+  (and long dead) base_cms product.
+
 - Worklists and Transitions: Add icon expression properties to worklist
   and transition actions and their GenericSetup profiles.
 

Modified: Products.DCWorkflow/trunk/Products/DCWorkflow/WorkflowUIMixin.py
===================================================================
--- Products.DCWorkflow/trunk/Products/DCWorkflow/WorkflowUIMixin.py	2008-10-10 16:04:10 UTC (rev 91989)
+++ Products.DCWorkflow/trunk/Products/DCWorkflow/WorkflowUIMixin.py	2008-10-10 16:17:59 UTC (rev 91990)
@@ -29,20 +29,7 @@
 from Guard import Guard
 from utils import _dtmldir
 
-try:
-    #
-    #   XXX: 2004/04/28  This factoring *has* to go;  if necessary,
-    #         this module could have a hook function, which the dependent
-    #         module could replace.
-    #
 
-    # If base_cms exists, include the roles it defines.
-    from Products.base_cms.permissions import getDefaultRolePermissionMap
-except ImportError:
-    def getDefaultRolePermissionMap():
-        return {}
-
-
 class WorkflowUIMixin:
     '''
     '''
@@ -166,9 +153,6 @@
         """Returns the acquired roles mixed with base_cms roles.
         """
         roles = list(self.valid_roles())
-        for role in getDefaultRolePermissionMap().keys():
-            if role not in roles:
-                roles.append(role)
         roles.sort()
         return roles
 
@@ -176,14 +160,8 @@
     def getRoles(self):
         """Returns the list of roles managed by this workflow.
         """
-        roles = self.roles
-        if roles is not None:
-            return roles
-        roles = getDefaultRolePermissionMap().keys()
-        if roles:
-            # Map the base_cms roles by default.
-            roles.sort()
-            return roles
+        if self.roles is not None:
+            return self.roles
         return self.valid_roles()
 
     security.declareProtected(ManagePortal, 'setRoles')



More information about the Checkins mailing list