backport of commit 6946556e96 (#19225)

Co-authored-by: Angel Garbarino <Monkeychip@users.noreply.github.com>
This commit is contained in:
hc-github-team-secure-vault-core
2023-02-16 13:40:57 -05:00
committed by GitHub
parent 0490c4c508
commit 6c84c14e1a
2 changed files with 10 additions and 2 deletions

3
changelog/19190.txt Normal file
View File

@@ -0,0 +1,3 @@
```release-note:bug
ui: show Get credentials button for static roles detail page when a user has the proper permissions.
```

View File

@@ -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>