From 6c84c14e1a7b748b7cb1a6d250073c23c6024e19 Mon Sep 17 00:00:00 2001 From: hc-github-team-secure-vault-core <82990506+hc-github-team-secure-vault-core@users.noreply.github.com> Date: Thu, 16 Feb 2023 13:40:57 -0500 Subject: [PATCH] backport of commit 6946556e96c418fe2b485faf3c4b4f2a25a14446 (#19225) Co-authored-by: Angel Garbarino --- changelog/19190.txt | 3 +++ ui/app/templates/components/database-role-edit.hbs | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 changelog/19190.txt diff --git a/changelog/19190.txt b/changelog/19190.txt new file mode 100644 index 000000000000..480006b1ebc8 --- /dev/null +++ b/changelog/19190.txt @@ -0,0 +1,3 @@ +```release-note:bug +ui: show Get credentials button for static roles detail page when a user has the proper permissions. +``` diff --git a/ui/app/templates/components/database-role-edit.hbs b/ui/app/templates/components/database-role-edit.hbs index 5528c6f6ea95..f6b1e85a5fad 100644 --- a/ui/app/templates/components/database-role-edit.hbs +++ b/ui/app/templates/components/database-role-edit.hbs @@ -36,12 +36,17 @@ Rotate credentials {{/if}} - {{#if @model.canGenerateCredentials}} + {{#if + (or + (and (eq @model.type "static") @model.canGetCredentials) + (and (eq @model.type "dynamic") @model.canGenerateCredentials) + ) + }}