Browse Source

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

changes/68/783568/1
Zuul 4 months ago
committed by Gerrit Code Review
parent
commit
bbec512f1d
  1. 8
      openstack_dashboard/dashboards/identity/users/tabs.py

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

Loading…
Cancel
Save