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
iv
erp5
Commits
0e0b9ca0
Commit
0e0b9ca0
authored
Oct 05, 2016
by
iv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5Workflow: fix testSecurity guard check
parent
3e532286
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
product/ERP5/tests/testSecurity.py
product/ERP5/tests/testSecurity.py
+1
-1
product/ERP5Type/patches/DCWorkflow.py
product/ERP5Type/patches/DCWorkflow.py
+5
-1
No files found.
product/ERP5/tests/testSecurity.py
View file @
0e0b9ca0
...
...
@@ -121,7 +121,7 @@ class TestSecurityMixin(ERP5TypeTestCase):
if
getattr
(
transition
,
'trigger_type'
,
1
)
==
0
:
# Automatic transition without guard is safe
continue
if
getattr
(
transition
,
'guard'
,
None
)
is
None
:
if
not
transition
.
isGuarded
()
:
error_list
.
append
(
'%s/transitions/%s'
%
(
wf
.
getId
(),
transition
.
getId
()))
if
error_list
:
message
=
'
\
n
The following %s workflow transitions are not guarded.
\
n
\
t
%s'
\
...
...
product/ERP5Type/patches/DCWorkflow.py
View file @
0e0b9ca0
...
...
@@ -71,7 +71,6 @@ def WorkflowUIMixin_setProperties( self, title
WorkflowUIMixin_class
.
setProperties
=
WorkflowUIMixin_setProperties
WorkflowUIMixin_class
.
manage_properties
=
DTMLFile
(
'workflow_properties'
,
_dtmldir
)
def
Guard_checkWithoutRoles
(
self
,
sm
,
wf_def
,
ob
,
**
kw
):
"""Checks conditions in this guard.
This function is the same as Guard.check, but roles are not taken
...
...
@@ -1094,6 +1093,10 @@ def DCWorkflowDefinition_deleteTransitions(self, name):
def
WorklistDefinition_getGuardRoleList
(
self
):
return
self
.
getGuard
().
getRolesText
().
split
(
';'
)
def
method_isGuarded
(
self
):
guard
=
getattr
(
self
,
'guard'
,
None
)
return
guard
is
not
None
DCWorkflowDefinition
.
addTransition
=
DCWorkflowDefinition_addTransition
DCWorkflowDefinition
.
deleteTransitions
=
DCWorkflowDefinition_deleteTransitions
DCWorkflowDefinition
.
getReference
=
method_getReference
...
...
@@ -1127,6 +1130,7 @@ StateDefinition.getStateTypeList = StateDefinition_getStateTypeList
TransitionDefinition
.
getParentValue
=
TransitionDefinition_getParentValue
TransitionDefinition
.
getReference
=
method_getReference
TransitionDefinition
.
showDict
=
DCWorkflowDefinition_showDict
TransitionDefinition
.
isGuarded
=
method_isGuarded
VariableDefinition
.
getReference
=
method_getReference
VariableDefinition
.
showDict
=
DCWorkflowDefinition_showDict
WorklistDefinition
.
getReference
=
method_getReference
...
...
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