Skip to content

Commit

Permalink
fix policy flow
Browse files Browse the repository at this point in the history
  • Loading branch information
Monkeychip committed Oct 2, 2024
1 parent adf9fd2 commit 8c40a00
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion ui/app/routes/vault/cluster/policy/show.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export default Route.extend(UnloadModelRoute, {
const type = this.policyType();
return hash({
policy: this.store.findRecord(`policy/${type}`, params.policy_name),
capabilities: this.store.findRecord('capabilities', `sys/policies/${type}/${params.policy_name}`),
});
},

Expand Down
4 changes: 2 additions & 2 deletions ui/app/templates/vault/cluster/policy/edit.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
</h1>
</p.levelLeft>
</PageHeader>
{{#if (and (not-eq this.model.id "root") (or this.model.updatePath.canUpdate this.model.updatePath.canDelete))}}
{{#if (and (not-eq this.model.id "root") (or this.model.canUpdate this.model.canDelete))}}
<Toolbar>
<ToolbarActions>
{{#if (and (not-eq this.model.id "default") this.model.updatePath.canDelete)}}
{{#if (and (not-eq this.model.id "default") this.model.canDelete)}}
<ConfirmAction
@buttonText="Delete policy"
class="toolbar-button"
Expand Down
2 changes: 1 addition & 1 deletion ui/app/templates/vault/cluster/policy/show.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
@extension={{if (eq this.policyType "acl") this.model.format "sentinel"}}
@text="Download policy"
/>
{{#if (and (not-eq this.model.id "root") (or this.model.updatePath.canUpdate this.model.updatePath.canDelete))}}
{{#if (and (not-eq this.model.id "root") (or this.model.canUpdate this.model.canDelete))}}
<ToolbarLink
@route="vault.cluster.policy.edit"
@models={{array this.policyType this.model.id}}
Expand Down

0 comments on commit 8c40a00

Please sign in to comment.