mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 10:30:03 -03:30
add conditional to show inventory script to org auditors
This commit is contained in:
parent
8be9e2b13e
commit
53d6d2734f
@ -1287,7 +1287,8 @@ class CustomInventoryScriptSerializer(BaseSerializer):
|
||||
request = self.context.get('request', None)
|
||||
if request.user not in obj.admin_role and \
|
||||
not request.user.is_superuser and \
|
||||
not request.user.is_system_auditor:
|
||||
not request.user.is_system_auditor and \
|
||||
not (obj.organization is not None and request.user in obj.organization.auditor_role):
|
||||
ret['script'] = None
|
||||
return ret
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user