mirror of
https://github.com/ansible/awx.git
synced 2026-03-07 11:41:08 -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:
|
if obj is None:
|
||||||
return ret
|
return ret
|
||||||
request = self.context.get('request', None)
|
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
|
ret['script'] = None
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user