Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
erp5
Commits
842bb92e
Commit
842bb92e
authored
Oct 26, 2011
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make ActivityRuntimeEnvironment.edit callable from restricted python.
parent
781c4d63
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
product/CMFActivity/ActivityRuntimeEnvironment.py
product/CMFActivity/ActivityRuntimeEnvironment.py
+6
-0
No files found.
product/CMFActivity/ActivityRuntimeEnvironment.py
View file @
842bb92e
from
Products.ERP5Type.TransactionalVariable
import
getTransactionalVariable
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type.Globals
import
InitializeClass
def
getActivityRuntimeEnvironment
():
"""
...
...
@@ -34,10 +36,12 @@ class BaseMessage:
class
ActivityRuntimeEnvironment
(
object
):
security
=
ClassSecurityInfo
()
def
__init__
(
self
,
message
):
self
.
_message
=
message
security
.
declarePublic
(
'edit'
)
def
edit
(
self
,
**
kw
):
# There is no point allowing to modify other attributes from a message
for
k
in
kw
:
...
...
@@ -46,3 +50,5 @@ class ActivityRuntimeEnvironment(object):
self
.
_message
.
activity_kw
.
get
(
k
)
is
not
None
:
raise
RuntimeError
(
"An error callback is already registered"
)
self
.
_message
.
activity_kw
.
update
(
kw
)
InitializeClass
(
ActivityRuntimeEnvironment
)
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