Show generate creds for static-roles when you have read permissions (#19190)
* fix, need to test and write test for * the fix * add test coverage * changelog: * woops param already existed * remove test coverage * Delete database-role-edit-test.js
This commit is contained in:
parent
2472029a0a
commit
18043a05e8
|
@ -0,0 +1,3 @@
|
|||
```release-note:bug
|
||||
ui: show Get credentials button for static roles detail page when a user has the proper permissions.
|
||||
```
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue