1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-11 13:53:34 +00:00

[PM-23788] changed the getType for canClone to address new cipherLike (#15829)

This commit is contained in:
Jason Ng
2025-07-30 08:54:45 -04:00
committed by GitHub
parent f079d79426
commit 2e6977e98c
2 changed files with 2 additions and 2 deletions

View File

@@ -78,7 +78,7 @@ export class ItemMoreOptionsComponent {
switchMap(([c, restrictedTypes]) => { switchMap(([c, restrictedTypes]) => {
// This will check for restrictions from org policies before allowing cloning. // This will check for restrictions from org policies before allowing cloning.
const isItemRestricted = restrictedTypes.some( const isItemRestricted = restrictedTypes.some(
(restrictType) => restrictType.cipherType === c.type, (restrictType) => restrictType.cipherType === CipherViewLikeUtils.getType(c),
); );
if (!isItemRestricted) { if (!isItemRestricted) {
return this.cipherAuthorizationService.canCloneCipher$(c); return this.cipherAuthorizationService.canCloneCipher$(c);

View File

@@ -285,7 +285,7 @@ export class VaultItemsComponent<C extends CipherViewLike> {
protected canClone(vaultItem: VaultItem<C>) { protected canClone(vaultItem: VaultItem<C>) {
// This will check for restrictions from org policies before allowing cloning. // This will check for restrictions from org policies before allowing cloning.
const isItemRestricted = this.restrictedPolicies().some( const isItemRestricted = this.restrictedPolicies().some(
(rt) => rt.cipherType === vaultItem.cipher.type, (rt) => rt.cipherType === CipherViewLikeUtils.getType(vaultItem.cipher),
); );
if (isItemRestricted) { if (isItemRestricted) {
return false; return false;