From b093c89a84733432e7b7e645dd6eec2bf57b8a76 Mon Sep 17 00:00:00 2001 From: David O Neill Date: Tue, 23 Jan 2024 18:59:05 +0000 Subject: [PATCH] Form hardening and node type exclusion Disabled add/edit/remove for managed nodes Tightened validation on Peers from control nodes --- .../Instances/InstanceDetail/InstanceDetail.js | 11 ++++++----- .../Instances/InstanceList/InstanceListItem.js | 4 +++- .../Instances/InstancePeers/InstancePeerList.js | 5 +++++ awx/ui/src/screens/Instances/Shared/InstanceForm.js | 5 +++-- 4 files changed, 17 insertions(+), 8 deletions(-) diff --git a/awx/ui/src/screens/Instances/InstanceDetail/InstanceDetail.js b/awx/ui/src/screens/Instances/InstanceDetail/InstanceDetail.js index 8e60ff5d68..6c508d87f5 100644 --- a/awx/ui/src/screens/Instances/InstanceDetail/InstanceDetail.js +++ b/awx/ui/src/screens/Instances/InstanceDetail/InstanceDetail.js @@ -183,6 +183,7 @@ function InstanceDetail({ setBreadcrumb, isK8s }) { } const isHopNode = instance.node_type === 'hop'; const isExecutionNode = instance.node_type === 'execution'; + const isManaged = instance.managed; return ( <> @@ -208,7 +209,7 @@ function InstanceDetail({ setBreadcrumb, isK8s }) { - {(isExecutionNode || isHopNode) && ( + {(isExecutionNode || isHopNode || !isManaged) && ( <> {instance.related?.install_bundle && ( @@ -338,7 +339,7 @@ function InstanceDetail({ setBreadcrumb, isK8s }) { )} - {config?.me?.is_superuser && isK8s && (isExecutionNode || isHopNode) && ( + {config?.me?.is_superuser && isK8s && (isExecutionNode || isHopNode || !isManaged) && (