Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI: fixes link from to show page from entity policies list #17950

Merged
merged 4 commits into from Nov 16, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelog/17950.txt
@@ -0,0 +1,3 @@
```release-note:bug
ui: fix entity policies list link to policy show page
```
2 changes: 1 addition & 1 deletion ui/app/templates/components/identity/item-policies.hbs
@@ -1,5 +1,5 @@
{{#each @model.policies as |policyName|}}
<LinkedBlock @params={{array "vault.cluster.policy.show" "acl" this.item}} class="list-item-row">
<LinkedBlock @params={{array "vault.cluster.policy.show" "acl" policyName}} class="list-item-row">
<div class="columns is-mobile">
<div class="column is-10">
<LinkTo
Expand Down
28 changes: 15 additions & 13 deletions ui/app/templates/vault/cluster/policy/show.hbs
Expand Up @@ -22,19 +22,21 @@
</p.levelLeft>
</PageHeader>
<Toolbar>
<ToolbarActions>
<ToolbarDownloadButton
@actionText="Download policy"
@extension={{if (eq this.policyType "acl") this.model.format "sentinel"}}
@filename={{this.model.name}}
@data={{this.model.policy}}
/>
{{#if (and (not-eq this.model.id "root") (or this.capabilities.canUpdate this.capabilities.canDelete))}}
<ToolbarLink @route="vault.cluster.policy.edit" @model={{this.model.id}} data-test-policy-edit-toggle>
Edit policy
</ToolbarLink>
{{/if}}
</ToolbarActions>
{{#unless this.model.updatePath.isPending}}
<ToolbarActions>
<ToolbarDownloadButton
@actionText="Download policy"
@extension={{if (eq this.policyType "acl") this.model.format "sentinel"}}
@filename={{this.model.name}}
@data={{this.model.policy}}
/>
{{#if (and (not-eq this.model.id "root") (or this.model.canUpdate this.model.canDelete))}}
<ToolbarLink @route="vault.cluster.policy.edit" @model={{this.model.id}} data-test-policy-edit-toggle>
Edit policy
</ToolbarLink>
{{/if}}
</ToolbarActions>
{{/unless}}
</Toolbar>
<div class="box is-bottomless is-fullwidth is-marginless">
<div class="field">
Expand Down