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
8778072e
Commit
8778072e
authored
Aug 23, 2016
by
iv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5Workflow: remove getGuard on worklists
parent
b6698116
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
product/ERP5Workflow/Document/Workflow.py
product/ERP5Workflow/Document/Workflow.py
+8
-5
product/ERP5Workflow/Document/Worklist.py
product/ERP5Workflow/Document/Worklist.py
+0
-1
No files found.
product/ERP5Workflow/Document/Workflow.py
View file @
8778072e
...
...
@@ -350,7 +350,11 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
workflow_title
=
self
.
getTitle
()
for
worklist_value
in
self
.
getWorklistValueList
():
action_box_name
=
worklist_value
.
getActionName
()
guard
=
worklist_value
.
getGuard
()
is_guarded
=
(
worklist_value
.
getGuardRoleList
()
or
worklist_value
.
getGuardGroupList
()
or
worklist_value
.
getGuardPermissionList
()
or
worklist_value
.
getGuardExpression
().
text
)
guard_role_list
=
worklist_value
.
getGuardRoleList
()
if
action_box_name
:
variable_match
=
{}
for
key
in
worklist_value
.
getVarMatchKeys
():
...
...
@@ -376,12 +380,11 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
continue
is_permitted_worklist
=
0
if
guard
is
None
:
if
is_guarded
:
is_permitted_worklist
=
1
elif
(
not
check_guard
)
or
\
Guard_checkWithoutRoles
(
guard
,
security_manager
,
self
,
portal
):
elif
(
not
check_guard
):
# XXX(WORKFLOW): there was: "or Guard_checkWithoutRoles(guard, security_manager, self, portal)"
is_permitted_worklist
=
1
variable_match
[
SECURITY_PARAMETER_ID
]
=
guard
.
roles
variable_match
[
SECURITY_PARAMETER_ID
]
=
guard
_role_list
if
is_permitted_worklist
:
fmt_data
=
TemplateDict
()
...
...
product/ERP5Workflow/Document/Worklist.py
View file @
8778072e
...
...
@@ -57,7 +57,6 @@ class Worklist(IdAsReferenceMixin("worklist_", "prefix"), XMLObject,
description = ''
var_matches = [] # Compared with catalog when set.
matched_portal_type = ''
guard = None
default_reference = ''
# Declarative security
security = ClassSecurityInfo()
...
...
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