Skip to content

Commit

Permalink
backport of commit 6946556 (hashicorp#19225)
Browse files Browse the repository at this point in the history
Co-authored-by: Angel Garbarino <Monkeychip@users.noreply.github.com>
  • Loading branch information
1 parent 0490c4c commit 6c84c14
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions changelog/19190.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
ui: show Get credentials button for static roles detail page when a user has the proper permissions.
```
9 changes: 7 additions & 2 deletions ui/app/templates/components/database-role-edit.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,17 @@
Rotate credentials
</button>
{{/if}}
{{#if @model.canGenerateCredentials}}
{{#if
(or
(and (eq @model.type "static") @model.canGetCredentials)
(and (eq @model.type "dynamic") @model.canGenerateCredentials)
)
}}
<button
type="button"
class="toolbar-link"
{{on "click" (fn this.generateCreds @model.id @model.type)}}
data-test-database-role-generate-creds
data-test-database-role-creds={{@model.type}}
>
{{if (eq @model.type "static") "Get credentials" "Generate credentials"}}
</button>
Expand Down

0 comments on commit 6c84c14

Please sign in to comment.