Commit d77c7978 authored by Ivan Tyagov's avatar Ivan Tyagov

Add local roles which were not added into previous commits.

parent 633e4ade
...@@ -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 = {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment