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
Aaron Chen
erp5
Commits
ce5f08fd
Commit
ce5f08fd
authored
May 19, 2015
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CMFActivity: make script with proxy roles usable as a grouping method
parent
89185deb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
product/CMFActivity/ActivityTool.py
product/CMFActivity/ActivityTool.py
+1
-0
product/CMFActivity/tests/testCMFActivity.py
product/CMFActivity/tests/testCMFActivity.py
+4
-1
No files found.
product/CMFActivity/ActivityTool.py
View file @
ce5f08fd
...
...
@@ -453,6 +453,7 @@ class GroupedMessage(object):
# XXX: Allowing restricted code to implement a grouping method is questionable
# but there already exist some.
__parent__
=
property
(
lambda
self
:
self
.
object
)
# for object
_guarded_writes
=
1
# for result
allow_class
(
GroupedMessage
)
...
...
product/CMFActivity/tests/testCMFActivity.py
View file @
ce5f08fd
...
...
@@ -3106,12 +3106,15 @@ class TestCMFActivity(ERP5TypeTestCase, LogInterceptor):
def
test_restrictedGroupMethod
(
self
):
skin
=
self
.
portal
.
portal_skins
.
custom
script_id
=
self
.
id
()
createZODBPythonScript
(
skin
,
script_id
,
"message_list"
,
"""if 1:
script
=
createZODBPythonScript
(
skin
,
script_id
,
"message_list"
,
"""if 1:
for m in message_list:
m.result = m.object.getProperty(*m.args, **m.kw)
"""
)
script
.
manage_proxy
((
"Manager"
,))
obj
=
self
.
portal
.
portal_activities
.
newActiveProcess
(
causality_value_list
=
(
self
.
portal
.
person_module
,
self
.
portal
.
organisation_module
))
obj
.
manage_permission
(
'Access contents information'
,
[
'Manager'
])
self
.
logout
()
foo
=
obj
.
activate
(
activity
=
'SQLQueue'
,
group_method_id
=
script_id
,
active_process
=
obj
.
getPath
()).
foo
...
...
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