[CMF-checkins] CVS: CMF/DCWorkflow - permissions.py:1.2
DCWorkflow.py:1.34 Default.py:1.15 Guard.py:1.15
Scripts.py:1.5 States.py:1.15 Transitions.py:1.12
Variables.py:1.9 WorkflowUIMixin.py:1.12 Worklists.py:1.11
Tres Seaver
tseaver at zope.com
Thu Apr 29 12:13:24 EDT 2004
Update of /cvs-repository/CMF/DCWorkflow
In directory cvs.zope.org:/tmp/cvs-serv25166/DCWorkflow
Modified Files:
DCWorkflow.py Default.py Guard.py Scripts.py States.py
Transitions.py Variables.py WorkflowUIMixin.py Worklists.py
Added Files:
permissions.py
Log Message:
- Merge tseaver-permissiongeddon-branch.
=== CMF/DCWorkflow/permissions.py 1.1 => 1.2 ===
--- /dev/null Thu Apr 29 12:13:24 2004
+++ CMF/DCWorkflow/permissions.py Thu Apr 29 12:13:23 2004
@@ -0,0 +1,25 @@
+""" DCWorkflow product permissions
+
+$Id$
+"""
+from AccessControl import ModuleSecurityInfo
+
+security = ModuleSecurityInfo('Products.DCWorkflow.permissions')
+
+security.declarePublic('AccessContentsInformation')
+from Products.CMFCore.permissions import AccessContentsInformation
+
+security.declarePublic('ManagePortal')
+from Products.CMFCore.permissions import ManagePortal
+
+security.declarePublic('ModifyPortalContent')
+from Products.CMFCore.permissions import ModifyPortalContent
+
+security.declarePublic('RequestReview')
+from Products.CMFCore.permissions import RequestReview
+
+security.declarePublic('ReviewPortalContent')
+from Products.CMFCore.permissions import ReviewPortalContent
+
+security.declarePublic('View')
+from Products.CMFCore.permissions import View
=== CMF/DCWorkflow/DCWorkflow.py 1.33 => 1.34 ===
--- CMF/DCWorkflow/DCWorkflow.py:1.33 Wed Feb 4 15:35:20 2004
+++ CMF/DCWorkflow/DCWorkflow.py Thu Apr 29 12:13:23 2004
@@ -18,16 +18,16 @@
# Zope
from AccessControl import ClassSecurityInfo
from AccessControl import getSecurityManager
-from Acquisition import aq_inner, aq_parent
+from AccessControl import Unauthorized
+from Acquisition import aq_inner
+from Acquisition import aq_parent
from App.Undo import UndoSupport
from DocumentTemplate.DT_Util import TemplateDict
from Globals import InitializeClass
from OFS.Folder import Folder
from OFS.ObjectManager import bad_id
-from AccessControl import Unauthorized
# CMFCore
-from Products.CMFCore.CMFCorePermissions import ManagePortal
from Products.CMFCore.interfaces.portal_workflow \
import WorkflowDefinition as IWorkflowDefinition
from Products.CMFCore.utils import getToolByName
@@ -37,11 +37,16 @@
from Products.CMFCore.WorkflowTool import addWorkflowFactory
# DCWorkflow
-from utils import _dtmldir, modifyRolesForPermission, modifyRolesForGroup
+from permissions import ManagePortal
+from utils import _dtmldir
+from utils import modifyRolesForPermission
+from utils import modifyRolesForGroup
from WorkflowUIMixin import WorkflowUIMixin
-from Transitions import TRIGGER_AUTOMATIC, TRIGGER_USER_ACTION, \
- TRIGGER_WORKFLOW_METHOD
-from Expression import StateChangeInfo, createExprContext
+from Transitions import TRIGGER_AUTOMATIC
+from Transitions import TRIGGER_USER_ACTION
+from Transitions import TRIGGER_WORKFLOW_METHOD
+from Expression import StateChangeInfo
+from Expression import createExprContext
def checkId(id):
=== CMF/DCWorkflow/Default.py 1.14 => 1.15 ===
--- CMF/DCWorkflow/Default.py:1.14 Mon Sep 1 11:18:36 2003
+++ CMF/DCWorkflow/Default.py Thu Apr 29 12:13:23 2004
@@ -15,13 +15,14 @@
$Id$
"""
-from Products.CMFCore.CMFCorePermissions import AccessContentsInformation
-from Products.CMFCore.CMFCorePermissions import ModifyPortalContent
-from Products.CMFCore.CMFCorePermissions import RequestReview
-from Products.CMFCore.CMFCorePermissions import ReviewPortalContent
-from Products.CMFCore.CMFCorePermissions import View
from Products.CMFCore.WorkflowTool import addWorkflowFactory
-from Products.DCWorkflow.DCWorkflow import DCWorkflowDefinition
+
+from DCWorkflow import DCWorkflowDefinition
+from permissions import AccessContentsInformation
+from permissions import ModifyPortalContent
+from permissions import RequestReview
+from permissions import ReviewPortalContent
+from permissions import View
p_access = AccessContentsInformation
p_modify = ModifyPortalContent
=== CMF/DCWorkflow/Guard.py 1.14 => 1.15 ===
--- CMF/DCWorkflow/Guard.py:1.14 Wed Mar 31 18:25:05 2004
+++ CMF/DCWorkflow/Guard.py Thu Apr 29 12:13:23 2004
@@ -17,15 +17,19 @@
from cgi import escape
-import Globals
-from Globals import DTMLFile, Persistent
+from Globals import DTMLFile
+from Globals import InitializeClass
+from Globals import Persistent
from AccessControl import ClassSecurityInfo
-from Acquisition import Explicit, aq_base
+from Acquisition import Explicit
+from Acquisition import aq_base
-from Products.CMFCore.CMFCorePermissions import ManagePortal
from Products.CMFCore.utils import _checkPermission
-from Expression import Expression, StateChangeInfo, createExprContext
+from Expression import Expression
+from Expression import StateChangeInfo
+from Expression import createExprContext
+from permissions import ManagePortal
from utils import _dtmldir
@@ -163,7 +167,7 @@
return ''
return str(self.expr.text)
-Globals.InitializeClass(Guard)
+InitializeClass(Guard)
def formatNameUnion(names):
=== CMF/DCWorkflow/Scripts.py 1.4 => 1.5 ===
--- CMF/DCWorkflow/Scripts.py:1.4 Fri Dec 26 08:05:22 2003
+++ CMF/DCWorkflow/Scripts.py Thu Apr 29 12:13:23 2004
@@ -16,12 +16,11 @@
"""
from OFS.Folder import Folder
-import Globals
+from Globals import InitializeClass
from AccessControl import ClassSecurityInfo
-from Products.CMFCore.CMFCorePermissions import ManagePortal
-
from ContainerTab import ContainerTab
+from permissions import ManagePortal
class Scripts (ContainerTab):
@@ -38,4 +37,4 @@
kw['management_view'] = 'Scripts'
return apply(Folder.manage_main, (self, client, REQUEST), kw)
-Globals.InitializeClass(Scripts)
+InitializeClass(Scripts)
=== CMF/DCWorkflow/States.py 1.14 => 1.15 ===
--- CMF/DCWorkflow/States.py:1.14 Tue Feb 17 12:11:53 2004
+++ CMF/DCWorkflow/States.py Thu Apr 29 12:13:23 2004
@@ -17,16 +17,18 @@
from types import TupleType
-from Acquisition import aq_inner, aq_parent
-import Globals
-from Globals import DTMLFile, PersistentMapping
+from Acquisition import aq_inner
+from Acquisition import aq_parent
+from Globals import DTMLFile
+from Globals import PersistentMapping
+from Globals import InitializeClass
from OFS.SimpleItem import SimpleItem
from AccessControl import ClassSecurityInfo
-from Products.CMFCore.CMFCorePermissions import ManagePortal
from Products.PageTemplates.PageTemplateFile import PageTemplateFile
from ContainerTab import ContainerTab
+from permissions import ManagePortal
from utils import _dtmldir
@@ -249,7 +251,7 @@
"%s/manage_groups?manage_tabs_message=Groups+changed."
% self.absolute_url())
-Globals.InitializeClass(StateDefinition)
+InitializeClass(StateDefinition)
class States (ContainerTab):
@@ -302,4 +304,4 @@
if REQUEST is not None:
return self.manage_main(REQUEST, 'Initial state selected.')
-Globals.InitializeClass(States)
+InitializeClass(States)
=== CMF/DCWorkflow/Transitions.py 1.11 => 1.12 ===
--- CMF/DCWorkflow/Transitions.py:1.11 Tue Feb 17 12:11:53 2004
+++ CMF/DCWorkflow/Transitions.py Thu Apr 29 12:13:23 2004
@@ -16,15 +16,16 @@
"""
from OFS.SimpleItem import SimpleItem
-from Globals import DTMLFile, PersistentMapping
-from Acquisition import aq_inner, aq_parent
-import Globals
+from Globals import DTMLFile
+from Globals import PersistentMapping
+from Globals import InitializeClass
+from Acquisition import aq_inner
+from Acquisition import aq_parent
from AccessControl import ClassSecurityInfo
-from Products.CMFCore.CMFCorePermissions import ManagePortal
-
from ContainerTab import ContainerTab
from Guard import Guard
+from permissions import ManagePortal
from utils import _dtmldir
from Expression import Expression
@@ -214,7 +215,7 @@
return self.manage_variables(REQUEST, 'Variables changed.')
-Globals.InitializeClass(TransitionDefinition)
+InitializeClass(TransitionDefinition)
class Transitions (ContainerTab):
@@ -256,4 +257,4 @@
if REQUEST is not None:
return self.manage_main(REQUEST, 'Transition(s) removed.')
-Globals.InitializeClass(Transitions)
+InitializeClass(Transitions)
=== CMF/DCWorkflow/Variables.py 1.8 => 1.9 ===
--- CMF/DCWorkflow/Variables.py:1.8 Tue Feb 17 12:11:53 2004
+++ CMF/DCWorkflow/Variables.py Thu Apr 29 12:13:23 2004
@@ -17,18 +17,17 @@
from OFS.SimpleItem import SimpleItem
from Globals import DTMLFile
-from Acquisition import aq_inner, aq_parent
-import Globals
+from Globals import InitializeClass
+from Acquisition import aq_inner
+from Acquisition import aq_parent
from AccessControl import ClassSecurityInfo
-from Products.CMFCore.CMFCorePermissions import ManagePortal
-
from ContainerTab import ContainerTab
from Guard import Guard
from Expression import Expression
+from permissions import ManagePortal
from utils import _dtmldir
-
class VariableDefinition (SimpleItem):
"""Variable definition"""
@@ -105,7 +104,7 @@
if REQUEST is not None:
return self.manage_properties(REQUEST, 'Properties changed.')
-Globals.InitializeClass(VariableDefinition)
+InitializeClass(VariableDefinition)
class Variables (ContainerTab):
@@ -164,4 +163,4 @@
if REQUEST is not None:
return self.manage_main(REQUEST, 'Set state variable.')
-Globals.InitializeClass(Variables)
+InitializeClass(Variables)
=== CMF/DCWorkflow/WorkflowUIMixin.py 1.11 => 1.12 ===
--- CMF/DCWorkflow/WorkflowUIMixin.py:1.11 Wed Mar 31 18:21:52 2004
+++ CMF/DCWorkflow/WorkflowUIMixin.py Thu Apr 29 12:13:23 2004
@@ -18,16 +18,23 @@
import os
from Globals import DTMLFile
-import Globals
+from Globals import InitializeClass
from AccessControl import ClassSecurityInfo
from Acquisition import aq_get
-from Products.CMFCore.CMFCorePermissions import ManagePortal
+
from Products.PageTemplates.PageTemplateFile import PageTemplateFile
+from permissions import ManagePortal
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:
@@ -210,4 +217,4 @@
from DocumentTemplate.DT_Var import structured_text
return structured_text(text)
-Globals.InitializeClass(WorkflowUIMixin)
+InitializeClass(WorkflowUIMixin)
=== CMF/DCWorkflow/Worklists.py 1.10 => 1.11 ===
--- CMF/DCWorkflow/Worklists.py:1.10 Tue Feb 17 12:12:42 2004
+++ CMF/DCWorkflow/Worklists.py Thu Apr 29 12:13:23 2004
@@ -18,15 +18,16 @@
from types import TupleType
from OFS.SimpleItem import SimpleItem
-from Globals import DTMLFile, PersistentMapping
-from Acquisition import aq_inner, aq_parent
-import Globals
+from Globals import DTMLFile
+from Globals import InitializeClass
+from Globals import PersistentMapping
+from Acquisition import aq_inner
+from Acquisition import aq_parent
from AccessControl import ClassSecurityInfo
-from Products.CMFCore.CMFCorePermissions import ManagePortal
-
from ContainerTab import ContainerTab
from Guard import Guard
+from permissions import ManagePortal
from utils import _dtmldir
@@ -138,7 +139,7 @@
if REQUEST is not None:
return self.manage_properties(REQUEST, 'Properties changed.')
-Globals.InitializeClass(WorklistDefinition)
+InitializeClass(WorklistDefinition)
class Worklists (ContainerTab):
@@ -180,4 +181,4 @@
if REQUEST is not None:
return self.manage_main(REQUEST, 'Worklist(s) removed.')
-Globals.InitializeClass(Worklists)
+InitializeClass(Worklists)
More information about the CMF-checkins
mailing list