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
Xavier Thompson
erp5
Commits
d77c7978
Commit
d77c7978
authored
Jul 10, 2012
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add local roles which were not added into previous commits.
parent
633e4ade
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
product/ERP5Catalog/CatalogTool.py
product/ERP5Catalog/CatalogTool.py
+10
-4
No files found.
product/ERP5Catalog/CatalogTool.py
View file @
d77c7978
...
@@ -150,8 +150,14 @@ class IndexableObjectWrapper(object):
...
@@ -150,8 +150,14 @@ class IndexableObjectWrapper(object):
# If not, continue to index it in roles_and_users table.
# If not, continue to index it in roles_and_users table.
if
(
user
,
role
)
not
in
optimized_role_set
:
if
(
user
,
role
)
not
in
optimized_role_set
:
user_role_dict
[
role
]
=
user
# Only add to user_role_dict if not in optimized_role_set (double check)
user_role_dict
[
role
]
=
user
# Only add to user_role_dict if not in optimized_role_set (double check)
if
role
in
allowed_role_set
:
else
:
user_view_permission_role_dict
[
role
]
=
user
# add here local roles which are not part of optimized ones
if
(
user
,
role
)
not
in
optimized_role_set
:
user_group
=
'%s:%s'
%
(
prefix
,
role
)
if
prefix
not
in
allowed_role_set
:
allowed_role_set
.
add
(
prefix
)
if
user_group
not
in
allowed_role_set
:
allowed_role_set
.
add
(
user_group
)
# sort `allowed` principals
# sort `allowed` principals
sorted_allowed_by_local_roles_group_id
=
{}
sorted_allowed_by_local_roles_group_id
=
{}
...
...
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