From 51c3d77a92061c460ebfa208484c2fd06092701c Mon Sep 17 00:00:00 2001 From: mabashian Date: Wed, 23 Aug 2017 11:07:02 -0400 Subject: [PATCH] Disable togglehost when user cannot edit host --- .../groups/related/nested-hosts/group-nested-hosts.list.js | 2 +- .../inventories/related/hosts/related-host.list.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/awx/ui/client/src/inventories-hosts/inventories/related/groups/related/nested-hosts/group-nested-hosts.list.js b/awx/ui/client/src/inventories-hosts/inventories/related/groups/related/nested-hosts/group-nested-hosts.list.js index 5e9b4d21d4..f2cadaf54b 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/related/groups/related/nested-hosts/group-nested-hosts.list.js +++ b/awx/ui/client/src/inventories-hosts/inventories/related/groups/related/nested-hosts/group-nested-hosts.list.js @@ -21,7 +21,7 @@ export default ['i18n', function(i18n) { fields: { toggleHost: { - ngDisabled: 'host.has_inventory_sources', + ngDisabled: '!nested_host.summary_fields.user_capabilities.edit || host.has_inventory_sources', label: '', columnClass: 'List-staticColumn--toggle', type: "toggle", diff --git a/awx/ui/client/src/inventories-hosts/inventories/related/hosts/related-host.list.js b/awx/ui/client/src/inventories-hosts/inventories/related/hosts/related-host.list.js index 467b0113db..09fb976e35 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/related/hosts/related-host.list.js +++ b/awx/ui/client/src/inventories-hosts/inventories/related/hosts/related-host.list.js @@ -20,7 +20,7 @@ export default ['i18n', function(i18n) { fields: { toggleHost: { - ngDisabled: 'host.has_inventory_sources', + ngDisabled: '!host.summary_fields.user_capabilities.edit || host.has_inventory_sources', label: '', columnClass: 'List-staticColumn--toggle', type: "toggle",