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
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
Alexander Emmerich
erp5
Commits
5c2695d5
Commit
5c2695d5
authored
Sep 24, 2021
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_administration: Query directly to skip 1k limitations
parent
5628bc7b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/Base_cleanupRolesAndUsersTable.py
...ins/erp5_administration/Base_cleanupRolesAndUsersTable.py
+5
-3
No files found.
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/Base_cleanupRolesAndUsersTable.py
View file @
5c2695d5
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
req
=
portal
.
cmf_activity_sql_connection
().
query
security_uid_field_list
=
[
x
+
(
"_"
if
x
!=
""
else
""
)
+
"security_uid"
for
x
in
portal
.
portal_catalog
.
getSQLCatalog
().
getSQLCatalogSecurityUidGroupsColumnsDict
().
keys
()]
security_uid_field_list
=
[
x
+
(
"_"
if
x
!=
""
else
""
)
+
"security_uid"
for
x
in
portal
.
portal_catalog
.
getSQLCatalog
().
getSQLCatalogSecurityUidGroupsColumnsDict
().
keys
()]
security_uid_set
_list
=
[]
security_uid_set
=
set
()
for
security_uid_field
in
security_uid_field_list
:
for
security_uid_field
in
security_uid_field_list
:
security_uid_set
_list
.
append
({
getattr
(
x
,
security_uid_field
)
for
x
in
context
.
z_get_referenced_security_uid_set_for
(
security_uid_field
=
security_uid_field
)}
)
security_uid_set
.
update
([
row
[
0
]
for
row
in
req
(
"select distinct %s from catalog"
%
(
security_uid_field
),
max_rows
=
0
)[
1
]]
)
security_uid_set
=
reduce
(
lambda
p
,
v
:
p
.
union
(
v
),
security_uid_set_list
)
filtered_set
=
context
.
Base_filterSecurityUidDict
(
filtered_set
=
context
.
Base_filterSecurityUidDict
(
portal
.
portal_catalog
.
getSQLCatalog
(
catalog_id
).
security_uid_dict
,
portal
.
portal_catalog
.
getSQLCatalog
(
catalog_id
).
security_uid_dict
,
security_uid_set
security_uid_set
...
...
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