Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sebastien Robin
erp5
Commits
585d043a
Commit
585d043a
authored
Aug 05, 2016
by
iv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5Workflow: temporarily change listAction security, add XXX comments, rename variables
parent
4d78759b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
14 deletions
+17
-14
product/ERP5Workflow/Document/Interaction.py
product/ERP5Workflow/Document/Interaction.py
+1
-0
product/ERP5Workflow/Document/Worklist.py
product/ERP5Workflow/Document/Worklist.py
+5
-4
product/ERP5Workflow/Tool/WorkflowTool.py
product/ERP5Workflow/Tool/WorkflowTool.py
+11
-10
No files found.
product/ERP5Workflow/Document/Interaction.py
View file @
585d043a
...
...
@@ -95,6 +95,7 @@ class Interaction(IdAsReferenceMixin('interaction_', "prefix"), XMLObject):
return
res
def
getGuard
(
self
):
# XXX(WORKFLOW): same code in Worklist, please unify
if
self
.
getGuardRoleList
()
is
None
and
\
self
.
getGuardPermissionList
()
is
None
and
\
self
.
getGuardGroupList
()
is
None
and
\
...
...
product/ERP5Workflow/Document/Worklist.py
View file @
585d043a
...
...
@@ -85,6 +85,7 @@ class Worklist(IdAsReferenceMixin("worklist_", "prefix"), XMLObject):
return res
def getGuard(self):
# XXX(WORKFLOW), I would remove the complete first if below
if self.getGuardRoleList() is None and
\
self.getGuardPermissionList() is None and
\
self.getGuardGroupList() is None and
\
...
...
@@ -166,13 +167,13 @@ class Worklist(IdAsReferenceMixin("worklist_", "prefix"), XMLObject):
def getVarMatchKeys(self):
key_list = []
if self.getMatchedPortalTypeList()
is not None
:
if self.getMatchedPortalTypeList():
key_list.append('
portal_type
')
if self.getMatchedSimulationStateList()
is not None
:
if self.getMatchedSimulationStateList():
key_list.append('
simulation_state
')
if self.getMatchedValidationStateList()
is not None
:
if self.getMatchedValidationStateList():
key_list.append('
validation_state
')
if self.getMatchedCausalityState()
is not None
:
if self.getMatchedCausalityState():
key_list.append('
causality_state
')
for dynamic_variable in self.objectValues():
if dynamic_variable.getVariableValue() or dynamic_variable.getVariableExpression():
...
...
product/ERP5Workflow/Tool/WorkflowTool.py
View file @
585d043a
...
...
@@ -783,6 +783,8 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
def
delTypeCBT
(
self
,
pt
,
wf_id
):
self
.
_chains_by_type
[
pt
]
=
tuple
(
wf
for
wf
in
self
.
_chains_by_type
[
pt
]
if
wf
!=
wf_id
)
# XXX(WORKFLOW) check what was the security before
security
.
declarePublic
(
'listActions'
)
def
listActions
(
self
,
info
=
None
,
object
=
None
,
src__
=
False
):
"""
Returns a list of actions to be displayed to the user.
...
...
@@ -827,22 +829,21 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
did
[
wf_id
]
=
None
wf
=
self
.
getWorkflowById
(
wf_id
)
if
wf
is
not
None
:
a
=
wf
.
listObjectActions
(
info
)
if
a
is
not
None
:
actions
.
extend
(
a
)
a
=
wf
.
getWorklistVariableMatchDict
(
info
)
if
a
is
not
None
:
worklist_dict
[
wf_id
]
=
a
object_action_list
=
wf
.
listObjectActions
(
info
)
if
object_action_list
is
not
None
:
actions
.
extend
(
object_action_list
)
worklist_variable_dict
=
wf
.
getWorklistVariableMatchDict
(
info
)
if
worklist_variable_dict
is
not
None
:
worklist_dict
[
wf_id
]
=
worklist_variable_dict
wf_ids
=
self
.
getWorkflowIds
()
for
wf_id
in
wf_ids
:
if
not
did
.
has_key
(
wf_id
):
wf
=
self
.
getWorkflowById
(
wf_id
)
if
wf
is
not
None
:
a
=
wf
.
getWorklistVariableMatchDict
(
info
)
if
a
is
not
None
:
worklist_dict
[
wf_id
]
=
a
worklist_variable_dict
=
wf
.
getWorklistVariableMatchDict
(
info
)
if
worklist_variable_dict
is
not
None
:
worklist_dict
[
wf_id
]
=
worklist_variable_dict
if
worklist_dict
:
portal
=
self
.
getPortalObject
()
portal_url
=
portal
.
portal_url
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment