mirror of
https://github.com/ansible/awx.git
synced 2026-03-06 19:21:06 -03:30
ensure system admin/auditor can see orphan inventory scripts
This commit is contained in:
committed by
John Mitchell
parent
f0bfcd78d9
commit
a801ee7d52
@@ -1283,7 +1283,9 @@ class CustomInventoryScriptSerializer(BaseSerializer):
|
||||
if obj is None:
|
||||
return ret
|
||||
request = self.context.get('request', None)
|
||||
if request.user not in obj.admin_role:
|
||||
if request.user not in obj.admin_role and \
|
||||
not request.user.is_superuser and \
|
||||
not request.user.is_system_auditor:
|
||||
ret['script'] = None
|
||||
return ret
|
||||
|
||||
|
||||
Reference in New Issue
Block a user