From 2e6977e98c75ce34a39109a02ee2ed8e20942a49 Mon Sep 17 00:00:00 2001 From: Jason Ng Date: Wed, 30 Jul 2025 08:54:45 -0400 Subject: [PATCH] [PM-23788] changed the getType for canClone to address new cipherLike (#15829) --- .../vault-v2/item-more-options/item-more-options.component.ts | 2 +- .../app/vault/components/vault-items/vault-items.component.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/browser/src/vault/popup/components/vault-v2/item-more-options/item-more-options.component.ts b/apps/browser/src/vault/popup/components/vault-v2/item-more-options/item-more-options.component.ts index 6c3a7243309..9ee3c3a6e41 100644 --- a/apps/browser/src/vault/popup/components/vault-v2/item-more-options/item-more-options.component.ts +++ b/apps/browser/src/vault/popup/components/vault-v2/item-more-options/item-more-options.component.ts @@ -78,7 +78,7 @@ export class ItemMoreOptionsComponent { switchMap(([c, restrictedTypes]) => { // This will check for restrictions from org policies before allowing cloning. const isItemRestricted = restrictedTypes.some( - (restrictType) => restrictType.cipherType === c.type, + (restrictType) => restrictType.cipherType === CipherViewLikeUtils.getType(c), ); if (!isItemRestricted) { return this.cipherAuthorizationService.canCloneCipher$(c); diff --git a/apps/web/src/app/vault/components/vault-items/vault-items.component.ts b/apps/web/src/app/vault/components/vault-items/vault-items.component.ts index 8be2b129450..e63b353be9c 100644 --- a/apps/web/src/app/vault/components/vault-items/vault-items.component.ts +++ b/apps/web/src/app/vault/components/vault-items/vault-items.component.ts @@ -285,7 +285,7 @@ export class VaultItemsComponent { protected canClone(vaultItem: VaultItem) { // This will check for restrictions from org policies before allowing cloning. const isItemRestricted = this.restrictedPolicies().some( - (rt) => rt.cipherType === vaultItem.cipher.type, + (rt) => rt.cipherType === CipherViewLikeUtils.getType(vaultItem.cipher), ); if (isItemRestricted) { return false;