Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hamza
erp5-Boxiang
Commits
fbaa5bed
Commit
fbaa5bed
authored
Dec 04, 2013
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Listbox: take into account security for domain tree
Expired categories should not be displayed
parent
397b6124
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
product/ERP5Form/ListBox.py
product/ERP5Form/ListBox.py
+6
-3
No files found.
product/ERP5Form/ListBox.py
View file @
fbaa5bed
...
@@ -1453,7 +1453,8 @@ class ListBoxRenderer:
...
@@ -1453,7 +1453,8 @@ class ListBoxRenderer:
getStatSelectExpression
=
lazyMethod
(
getStatSelectExpression
)
getStatSelectExpression
=
lazyMethod
(
getStatSelectExpression
)
def
makeReportTreeList
(
self
,
root_dict
=
None
,
report_path
=
None
,
base_category
=
None
,
depth
=
0
,
def
makeReportTreeList
(
self
,
root_dict
=
None
,
report_path
=
None
,
base_category
=
None
,
depth
=
0
,
unfolded_list
=
(),
is_report_opened
=
True
,
sort_on
=
((
'id'
,
'ASC'
),)):
unfolded_list
=
(),
is_report_opened
=
True
,
sort_on
=
((
'id'
,
'ASC'
),),
checked_permission
=
'View'
):
"""Return a list of report trees.
"""Return a list of report trees.
"""
"""
if
isinstance
(
report_path
,
str
):
if
isinstance
(
report_path
,
str
):
...
@@ -1517,7 +1518,8 @@ class ListBoxRenderer:
...
@@ -1517,7 +1518,8 @@ class ListBoxRenderer:
if
getChildDomainValueList
is
not
None
and
base_category
!=
'parent'
:
if
getChildDomainValueList
is
not
None
and
base_category
!=
'parent'
:
obj_list
=
root
.
getChildDomainValueList
(
root
,
depth
=
depth
)
obj_list
=
root
.
getChildDomainValueList
(
root
,
depth
=
depth
)
elif
contentValues
is
not
None
:
elif
contentValues
is
not
None
:
obj_list
=
root
.
contentValues
(
sort_on
=
sort_on
)
obj_list
=
root
.
contentValues
(
sort_on
=
sort_on
,
checked_permission
=
checked_permission
)
else
:
else
:
obj_list
=
()
obj_list
=
()
...
@@ -1540,7 +1542,8 @@ class ListBoxRenderer:
...
@@ -1540,7 +1542,8 @@ class ListBoxRenderer:
# which can be used as a part of the report tree. Otherwise,
# which can be used as a part of the report tree. Otherwise,
# sub-objects are displayed twice unnecessarily.
# sub-objects are displayed twice unnecessarily.
if
base_category
==
'parent'
:
if
base_category
==
'parent'
:
for
sub_obj
in
obj
.
contentValues
(
sort_on
=
sort_on
):
for
sub_obj
in
obj
.
contentValues
(
sort_on
=
sort_on
,
checked_permission
=
checked_permission
):
if
getattr
(
aq_base
(
sub_obj
),
'objectValues'
,
None
)
is
not
None
:
if
getattr
(
aq_base
(
sub_obj
),
'objectValues'
,
None
)
is
not
None
:
exception_uid_list
.
append
(
sub_obj
.
getUid
())
exception_uid_list
.
append
(
sub_obj
.
getUid
())
...
...
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