From ddb588f7a61bdfd2d6649973b9fa0c1bf6352b53 Mon Sep 17 00:00:00 2001 From: mabashian Date: Thu, 31 Aug 2017 11:31:51 -0400 Subject: [PATCH] Disable insights cred when user doesn't have edit permissions --- .../inventories/standard-inventory/inventory.form.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/awx/ui/client/src/inventories-hosts/inventories/standard-inventory/inventory.form.js b/awx/ui/client/src/inventories-hosts/inventories/standard-inventory/inventory.form.js index 318c775eff..67b862bc8a 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/standard-inventory/inventory.form.js +++ b/awx/ui/client/src/inventories-hosts/inventories/standard-inventory/inventory.form.js @@ -74,7 +74,8 @@ function(i18n, InventoryCompletedJobsList) { sourceField: 'name', search: { credential_type: '13' //insights - } + }, + ngDisabled: '!(inventory_obj.summary_fields.user_capabilities.edit || canAdd) || !canEditOrg', }, instance_groups: { label: i18n._('Instance Groups'),