From a9f3d702de1e4ec32186dc87f08b739cbd48edc6 Mon Sep 17 00:00:00 2001 From: "clairebontempo@gmail.com" Date: Tue, 15 Nov 2022 14:09:03 -0800 Subject: [PATCH 1/4] wait for policy capabilities to load --- .../components/identity/item-policies.hbs | 2 +- .../templates/vault/cluster/policy/show.hbs | 28 ++++++++++--------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/ui/app/templates/components/identity/item-policies.hbs b/ui/app/templates/components/identity/item-policies.hbs index 6a72f23a853f8..47676fd32e5ef 100644 --- a/ui/app/templates/components/identity/item-policies.hbs +++ b/ui/app/templates/components/identity/item-policies.hbs @@ -1,5 +1,5 @@ {{#each @model.policies as |policyName|}} - +
- - - {{#if (and (not-eq this.model.id "root") (or this.capabilities.canUpdate this.capabilities.canDelete))}} - - Edit policy - - {{/if}} - + {{#unless this.capabilities.isLoaded}} + + + {{#if (and (not-eq this.model.id "root") (or this.capabilities.canUpdate this.capabilities.canDelete))}} + + Edit policy + + {{/if}} + + {{/unless}}
From e109d04952646945b2334da9fd3378db4e956664 Mon Sep 17 00:00:00 2001 From: "clairebontempo@gmail.com" Date: Tue, 15 Nov 2022 14:28:19 -0800 Subject: [PATCH 2/4] add changelog --- changelog/17950.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changelog/17950.txt diff --git a/changelog/17950.txt b/changelog/17950.txt new file mode 100644 index 0000000000000..318334e4a20c4 --- /dev/null +++ b/changelog/17950.txt @@ -0,0 +1,3 @@ +```release-note:bug +ui: fix entity policies list link to policy show page +``` From b509f88ee4b9931cbaa45e457f17edcd33bd756c Mon Sep 17 00:00:00 2001 From: "clairebontempo@gmail.com" Date: Tue, 15 Nov 2022 16:54:06 -0800 Subject: [PATCH 3/4] fix tests --- ui/app/templates/vault/cluster/policy/show.hbs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/app/templates/vault/cluster/policy/show.hbs b/ui/app/templates/vault/cluster/policy/show.hbs index 7934b7378b945..c6b7a4787425d 100644 --- a/ui/app/templates/vault/cluster/policy/show.hbs +++ b/ui/app/templates/vault/cluster/policy/show.hbs @@ -22,7 +22,7 @@ - {{#unless this.capabilities.isLoaded}} + {{#unless this.model.updatePath.isPending}} - {{#if (and (not-eq this.model.id "root") (or this.capabilities.canUpdate this.capabilities.canDelete))}} + {{#if (and (not-eq this.model.id "root") (or this.model.canUpdate this.model.canDelete))}} Edit policy From fb637e4dd491add0cf7a2f4479414fb032955fd9 Mon Sep 17 00:00:00 2001 From: "clairebontempo@gmail.com" Date: Wed, 16 Nov 2022 09:39:39 -0800 Subject: [PATCH 4/4] revert template --- .../templates/vault/cluster/policy/show.hbs | 28 +++++++++---------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/ui/app/templates/vault/cluster/policy/show.hbs b/ui/app/templates/vault/cluster/policy/show.hbs index c6b7a4787425d..4422df40f0516 100644 --- a/ui/app/templates/vault/cluster/policy/show.hbs +++ b/ui/app/templates/vault/cluster/policy/show.hbs @@ -22,21 +22,19 @@ - {{#unless this.model.updatePath.isPending}} - - - {{#if (and (not-eq this.model.id "root") (or this.model.canUpdate this.model.canDelete))}} - - Edit policy - - {{/if}} - - {{/unless}} + + + {{#if (and (not-eq this.model.id "root") (or this.capabilities.canUpdate this.capabilities.canDelete))}} + + Edit policy + + {{/if}} +