From bcd98f23e3006bdb3acabd9a4ecdae37586aa367 Mon Sep 17 00:00:00 2001 From: Vault Automation Date: Mon, 29 Sep 2025 18:47:03 -0400 Subject: [PATCH] hide unload action in non root namespaces (#9718) (#9741) Co-authored-by: lane-wetmore --- .../components/recovery/page/snapshots/snapshot-details.hbs | 4 +++- ui/app/components/recovery/page/snapshots/snapshot-details.ts | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/app/components/recovery/page/snapshots/snapshot-details.hbs b/ui/app/components/recovery/page/snapshots/snapshot-details.hbs index 1a58e16b6b..917de05001 100644 --- a/ui/app/components/recovery/page/snapshots/snapshot-details.hbs +++ b/ui/app/components/recovery/page/snapshots/snapshot-details.hbs @@ -48,7 +48,9 @@ @route="vault.cluster.recovery.snapshots.snapshot.manage" @models={{array @model.snapshot.snapshot_id}} >Manage secrets - Unload snapshot + {{#if this.namespace.inRootNamespace}} + Unload snapshot + {{/if}} diff --git a/ui/app/components/recovery/page/snapshots/snapshot-details.ts b/ui/app/components/recovery/page/snapshots/snapshot-details.ts index a7bae93430..95c09e74a1 100644 --- a/ui/app/components/recovery/page/snapshots/snapshot-details.ts +++ b/ui/app/components/recovery/page/snapshots/snapshot-details.ts @@ -14,6 +14,7 @@ import { dateFormat } from 'core/helpers/date-format'; import { tracked } from '@glimmer/tracking'; import type ApiService from 'vault/services/api'; +import type NamespaceService from 'vault/services/namespace'; import type RouterService from '@ember/routing/router-service'; import type { SnapshotManageModel } from 'vault/routes/vault/cluster/recovery/snapshots/snapshot/manage'; import type FlashMessageService from 'vault/services/flash-messages'; @@ -25,6 +26,7 @@ interface Args { export default class SnapshotDetails extends Component { @service declare readonly api: ApiService; @service declare readonly flashMessages: FlashMessageService; + @service declare readonly namespace: NamespaceService; @service declare readonly router: RouterService; @tracked snapshotStatus?: string = '';