Skip to content

Commit

Permalink
backport of commit 6946556
Browse files Browse the repository at this point in the history
  • Loading branch information
Monkeychip committed Feb 16, 2023
1 parent 673839f commit 9d3f1ae
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 9d3f1ae

Please sign in to comment.