mirror of
https://github.com/ansible/awx.git
synced 2026-01-16 12:20:45 -03:30
Merge pull request #2820 from anoek/2806
Allow anyone who can read an inventory to see adhoc command run against said inventory
This commit is contained in:
commit
b6ec87f18a
@ -1087,7 +1087,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