Browse Source

Merge "Don't load user role assignment or groups tabs for non-admins" into stable/wallaby

changes/61/786361/1
Zuul 2 weeks ago
committed by Gerrit Code Review
parent
commit
01da6a899c
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      openstack_dashboard/dashboards/identity/users/tabs.py

+ 8
- 0
openstack_dashboard/dashboards/identity/users/tabs.py View File

@ -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']


Loading…
Cancel
Save