mirror of
https://github.com/ansible/awx.git
synced 2026-04-09 03:59:21 -02:30
Replaced get user permissions with get_roles_on_resource
This commit is contained in:
@@ -667,7 +667,7 @@ class OrganizationDetail(RetrieveUpdateDestroyAPIView):
|
||||
org_id = int(self.kwargs['pk'])
|
||||
|
||||
org_counts = {}
|
||||
access_kwargs = {'accessor': self.request.user, 'permissions': {"read": True}}
|
||||
access_kwargs = {'accessor': self.request.user, 'role_name': 'read_role'}
|
||||
direct_counts = Organization.objects.filter(id=org_id).annotate(
|
||||
users=Count('member_role__members', distinct=True),
|
||||
admins=Count('admin_role__members', distinct=True)
|
||||
|
||||
Reference in New Issue
Block a user