mirror of
https://github.com/ansible/awx.git
synced 2026-01-21 22:48:02 -03:30
Allow anyone who can read an inventory to see adhoc command run against said inventory
This commit is contained in:
parent
9ffb5261cd
commit
0e7ed8428d
@ -1076,7 +1076,7 @@ class AdHocCommandAccess(BaseAccess):
|
||||
return qs.all()
|
||||
|
||||
credential_ids = set(self.user.get_queryset(Credential).values_list('id', flat=True))
|
||||
inventory_qs = Inventory.accessible_objects(self.user, 'adhoc_role')
|
||||
inventory_qs = Inventory.accessible_objects(self.user, 'read_role')
|
||||
|
||||
return qs.filter(credential_id__in=credential_ids,
|
||||
inventory__in=inventory_qs)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user