mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 08:21:15 +03:00
ensure system admin/auditor can see orphan inventory scripts
This commit is contained in:
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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user