diff options
author | Zuul <zuul@review.opendev.org> | 2021-07-14 11:48:39 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2021-07-14 11:48:39 +0000 |
commit | f4aaee3d1c4ea0f085221185530ec561ec946e1c (patch) | |
tree | e099be16217620df1e7d347af04a6340f4cd87a1 | |
parent | 146beeda55b290acb274017988c60c2662b50bed (diff) | |
parent | 00d24d7cae5cf763a33696d24b9277c6301b34fe (diff) | |
download | horizon-f4aaee3d1c4ea0f085221185530ec561ec946e1c.tar.gz |
Merge "Don't load user role assignment or groups tabs for non-admins" into stable/victoria
-rw-r--r-- | openstack_dashboard/dashboards/identity/users/tabs.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/openstack_dashboard/dashboards/identity/users/tabs.py b/openstack_dashboard/dashboards/identity/users/tabs.py index 30bcd0a3d..fe8fa3ba6 100644 --- a/openstack_dashboard/dashboards/identity/users/tabs.py +++ b/openstack_dashboard/dashboards/identity/users/tabs.py @@ -90,6 +90,10 @@ class RoleAssignmentsTab(tabs.TableTab): template_name = "horizon/common/_detail_table.html" preload = False + def allowed(self, request): + return policy.check((("identity", "identity:list_role_assignments"),), + self.request) + def get_roleassignmentstable_data(self): user = self.tab_group.kwargs['user'] @@ -136,6 +140,10 @@ class GroupsTab(tabs.TableTab): template_name = "horizon/common/_detail_table.html" preload = False + def allowed(self, request): + return policy.check((("identity", "identity:list_groups"),), + self.request) + def get_groupstable_data(self): user_groups = [] user = self.tab_group.kwargs['user'] |