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
Xiaowu Zhang
erp5
Commits
e35761e6
Commit
e35761e6
authored
Aug 26, 2021
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_core_test: test multi local role worklist
parent
0c945082
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
1 deletion
+42
-1
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testWorklist.py
...tTemplateItem/portal_components/test.erp5.testWorklist.py
+42
-1
No files found.
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testWorklist.py
View file @
e35761e6
...
...
@@ -545,3 +545,44 @@ class TestWorklist(TestWorkflowMixin):
finally
:
self
.
removeWorklist
(
self
.
checked_workflow
,
[
'region_worklist'
])
def
test_05_worklist_for_multiple_local_role
(
self
,
quiet
=
0
,
run
=
run_all_test
):
if
not
run
:
return
workflow_tool
=
self
.
getWorkflowTool
()
self
.
createManagerAndLogin
()
self
.
createUsers
()
self
.
logMessage
(
"Create worklists with multiple local roles"
)
self
.
createWorklist
(
self
.
checked_workflow
,
'assignor_or_assignee_worklist'
,
'assignor or assignee can view'
,
portal_type
=
self
.
checked_portal_type
,
validation_state
=
'validated'
,
guard_roles
=
"Assignor; Assignee"
)
try
:
document
=
self
.
createDocument
()
document
.
manage_addLocalRoles
(
"bar"
,
[
"Assignor"
])
document
.
manage_addLocalRoles
(
"foo"
,
[
"Assignee"
])
document
.
validate
()
document
.
reindexObject
()
self
.
tic
()
self
.
clearCache
()
self
.
logMessage
(
" Check that user bar can access worklist"
)
self
.
loginByUserName
(
'bar'
)
result
=
workflow_tool
.
listActions
(
object
=
document
)
self
.
checkWorklist
(
result
,
'assignor_or_assignee_worklist'
,
1
)
self
.
logMessage
(
" Check that user foo can access worklist"
)
self
.
loginByUserName
(
'foo'
)
result
=
workflow_tool
.
listActions
(
object
=
document
)
self
.
checkWorklist
(
result
,
'assignor_or_assignee_worklist'
,
1
)
finally
:
self
.
removeWorklist
(
self
.
checked_workflow
,
[
'assignor_or_assignee_worklist'
])
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