From 9d3f1aeb6610c09bc1ff10d5d10a061d82ff8777 Mon Sep 17 00:00:00 2001 From: Angel Garbarino Date: Thu, 16 Feb 2023 18:10:56 +0000 Subject: [PATCH] backport of commit 6946556e96c418fe2b485faf3c4b4f2a25a14446 --- 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 416608324547..6df07ced8faf 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) + ) + }}