mirror of
https://github.com/ansible/awx.git
synced 2026-02-12 23:24:48 -03:30
Rename System Auditor to Controller System Auditor (#15470)
This is to emphasize that this role is specific to controller component. That is, not an auditor for the entire AAP platform. Signed-off-by: Seth Foster <fosterbseth@gmail.com>
This commit is contained in:
@@ -826,7 +826,7 @@ class ResourceAccessList(ParentMixin, ListAPIView):
|
||||
if settings.ANSIBLE_BASE_ROLE_SYSTEM_ACTIVATED:
|
||||
ancestors = set(RoleEvaluation.objects.filter(content_type_id=content_type.id, object_id=obj.id).values_list('role_id', flat=True))
|
||||
qs = User.objects.filter(has_roles__in=ancestors) | User.objects.filter(is_superuser=True)
|
||||
auditor_role = RoleDefinition.objects.filter(name="System Auditor").first()
|
||||
auditor_role = RoleDefinition.objects.filter(name="Controller System Auditor").first()
|
||||
if auditor_role:
|
||||
qs |= User.objects.filter(role_assignments__role_definition=auditor_role)
|
||||
return qs.distinct()
|
||||
|
||||
Reference in New Issue
Block a user