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