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
Labels
Merge Requests
142
Merge Requests
142
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
7caa8349
Commit
7caa8349
authored
Dec 15, 2011
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes to Folder.recurseCallMethod
parent
a0d26594
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
product/ERP5Type/Core/Folder.py
product/ERP5Type/Core/Folder.py
+6
-4
No files found.
product/ERP5Type/Core/Folder.py
View file @
7caa8349
...
@@ -383,7 +383,7 @@ class FolderMixIn(ExtensionClass.Base):
...
@@ -383,7 +383,7 @@ class FolderMixIn(ExtensionClass.Base):
activate_kw
.
setdefault
(
'active_process'
,
None
)
activate_kw
.
setdefault
(
'active_process'
,
None
)
activate
=
portal
.
portal_activities
.
activateObject
activate
=
portal
.
portal_activities
.
activateObject
validate
=
restricted
and
getSecurityManager
().
validate
validate
=
restricted
and
getSecurityManager
().
validate
cost
=
activate_kw
.
ge
t
(
'group_method_cost'
,
.
034
)
# 30 objects
cost
=
activate_kw
.
setdefaul
t
(
'group_method_cost'
,
.
034
)
# 30 objects
if
cost
!=
1
:
if
cost
!=
1
:
activate_kw
.
setdefault
(
'group_method_id'
,
None
)
# dummy group method
activate_kw
.
setdefault
(
'group_method_id'
,
None
)
# dummy group method
activity_count
=
kw
.
get
(
'activity_count'
,
1000
)
activity_count
=
kw
.
get
(
'activity_count'
,
1000
)
...
@@ -394,7 +394,7 @@ class FolderMixIn(ExtensionClass.Base):
...
@@ -394,7 +394,7 @@ class FolderMixIn(ExtensionClass.Base):
try
:
try
:
recurse_stack
=
kw
[
'_recurse_stack'
]
recurse_stack
=
kw
[
'_recurse_stack'
]
except
KeyError
:
except
KeyError
:
recurse_stack
=
[
id_list
and
deque
(
id_list
)
or
min_id
or
''
]
recurse_stack
=
[
deque
(
id_list
)
if
id_list
else
min_id
or
''
]
kw
[
'_recurse_stack'
]
=
recurse_stack
kw
[
'_recurse_stack'
]
=
recurse_stack
min_depth
=
kw
.
get
(
'min_depth'
,
0
)
min_depth
=
kw
.
get
(
'min_depth'
,
0
)
max_depth
=
kw
.
get
(
'max_depth'
,
0
)
max_depth
=
kw
.
get
(
'max_depth'
,
0
)
...
@@ -445,9 +445,11 @@ class FolderMixIn(ExtensionClass.Base):
...
@@ -445,9 +445,11 @@ class FolderMixIn(ExtensionClass.Base):
method_id
,
method_args
,
method_kw
,
restricted
=
restricted
,
**
kw
)
method_id
,
method_args
,
method_kw
,
restricted
=
restricted
,
**
kw
)
security
.
declarePublic
(
'recurseCallMethod'
)
security
.
declarePublic
(
'recurseCallMethod'
)
def
recurseCallMethod
(
self
,
*
args
,
**
kw
):
def
recurseCallMethod
(
self
,
method_id
,
*
args
,
**
kw
):
"""Restricted version of _recurseCallMethod"""
"""Restricted version of _recurseCallMethod"""
return
self
.
_recurseCallMethod
(
restricted
=
True
,
*
args
,
**
kw
)
if
method_id
[
0
]
==
'_'
:
raise
AccessControl_Unauthorized
(
method_id
)
return
self
.
_recurseCallMethod
(
method_id
,
restricted
=
True
,
*
args
,
**
kw
)
OFS_HANDLER
=
0
OFS_HANDLER
=
0
BTREE_HANDLER
=
1
BTREE_HANDLER
=
1
...
...
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