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
06be4038
Commit
06be4038
authored
Feb 10, 2017
by
Sebastien Robin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5Workflow: add security declarations
parent
b9040c09
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
product/ERP5Workflow/Document/WorkflowVariable.py
product/ERP5Workflow/Document/WorkflowVariable.py
+4
-0
product/ERP5Workflow/Document/Worklist.py
product/ERP5Workflow/Document/Worklist.py
+4
-0
No files found.
product/ERP5Workflow/Document/WorkflowVariable.py
View file @
06be4038
...
...
@@ -74,8 +74,12 @@ class WorkflowVariable(IdAsReferenceMixin("variable_", "prefix"), XMLObject,
else
:
self
.
variable_expression
=
None
security
.
declareProtected
(
Permissions
.
ModifyPortalContent
,
'setVariableExpressionText'
)
def
setVariableExpressionText
(
self
,
text
):
self
.
variable_expression
=
Expression
(
text
)
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getVariableExpressionText'
)
def
getVariableExpressionText
(
self
):
return
getattr
(
self
.
variable_expression
,
'text'
,
''
)
product/ERP5Workflow/Document/Worklist.py
View file @
06be4038
...
...
@@ -74,6 +74,8 @@ class Worklist(IdAsReferenceMixin("worklist_", "prefix"), XMLObject,
PropertySheet.ActionInformation,
)
security.declareProtected(Permissions.AccessContentsInformation,
'
getAvailableCatalogVars
')
def getAvailableCatalogVars(self):
parent = self.getParentValue()
res = [parent.getStateVariable()]
...
...
@@ -84,6 +86,8 @@ class Worklist(IdAsReferenceMixin("worklist_", "prefix"), XMLObject,
res.sort()
return res
security.declareProtected(Permissions.ModifyPortalContent,
'
updateDynamicVariable
')
def updateDynamicVariable(self):
# Keep worklist variables updating, correspond to workflow variables.
# In the new workflow, we may not need this function for the moment.
...
...
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