From 9d712ccfc7a67193423f1a102ac2b9d3c6dc3733 Mon Sep 17 00:00:00 2001 From: Valeriia Ruban Date: Tue, 13 Feb 2024 14:00:04 -0800 Subject: [PATCH] =?UTF-8?q?chor:=20adds=20informative=20error=20message=20?= =?UTF-8?q?when=20acls=20disabled=20and=20read-only=E2=80=A6=20(#20600)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * adds informative error message when acls disabled and read-only selected * adds alert to the modal when there is no acls enabled --- .../components/link-to-hcp-modal/index.hbs | 11 +++++- .../components/link-to-hcp-modal/index.scss | 3 ++ .../components/link-to-hcp-modal-test.js | 35 +++++++++++++++++++ 3 files changed, 48 insertions(+), 1 deletion(-) diff --git a/ui/packages/consul-ui/app/components/link-to-hcp-modal/index.hbs b/ui/packages/consul-ui/app/components/link-to-hcp-modal/index.hbs index bd29b2423fb9..bdabe3b2e52e 100644 --- a/ui/packages/consul-ui/app/components/link-to-hcp-modal/index.hbs +++ b/ui/packages/consul-ui/app/components/link-to-hcp-modal/index.hbs @@ -10,6 +10,12 @@ Link to HCP Consul Central + {{#if (not (can "read acls"))}} + + ACLs are disabled on this cluster. + The cluster can only be linked with read/write access. + + {{/if}} Select cluster access mode before linking @@ -33,8 +39,11 @@ with the “builtin/global-read-only” policy in the next step. + {{#if (and this.isReadOnlyAccessLevelSelected (not (can "read acls")))}} + ACLs are disabled on this cluster and are required for read-only access. + {{/if}} - {{#if (and this.isReadOnlyAccessLevelSelected (can "create tokens"))}} + {{#if (and this.isReadOnlyAccessLevelSelected (can "read acls") (can "create tokens"))}}