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:
Angel Garbarino 2023-02-16 11:10:56 -07:00 committed by GitHub
parent 2472029a0a
commit 18043a05e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 Rotate credentials
</button> </button>
{{/if}} {{/if}}
{{#if @model.canGenerateCredentials}} {{#if
(or
(and (eq @model.type "static") @model.canGetCredentials)
(and (eq @model.type "dynamic") @model.canGenerateCredentials)
)
}}
<button <button
type="button" type="button"
class="toolbar-link" class="toolbar-link"
{{on "click" (fn this.generateCreds @model.id @model.type)}} {{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"}} {{if (eq @model.type "static") "Get credentials" "Generate credentials"}}
</button> </button>