diff --git a/changelog/14794.txt b/changelog/14794.txt new file mode 100644 index 000000000..fb4549222 --- /dev/null +++ b/changelog/14794.txt @@ -0,0 +1,3 @@ +```release-note:bug +ui: Fix KV secret showing in the edit form after a user creates a new version but doesn't have read capabilities +``` \ No newline at end of file diff --git a/ui/app/components/secret-create-or-update.js b/ui/app/components/secret-create-or-update.js index 05f97327e..ea7ba0309 100644 --- a/ui/app/components/secret-create-or-update.js +++ b/ui/app/components/secret-create-or-update.js @@ -129,6 +129,9 @@ export default class SecretCreateOrUpdate extends Component { return secretData .save() .then(() => { + if (!this.args.canReadSecretData && secret.selectedVersion) { + delete secret.selectedVersion.secretData; + } if (!secretData.isError) { if (isV2) { secret.set('id', key);