Browse Source

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

pull/15839/head
Jason Ng 5 months ago committed by GitHub
parent
commit
2e6977e98c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      apps/browser/src/vault/popup/components/vault-v2/item-more-options/item-more-options.component.ts
  2. 2
      apps/web/src/app/vault/components/vault-items/vault-items.component.ts

2
apps/browser/src/vault/popup/components/vault-v2/item-more-options/item-more-options.component.ts

@ -78,7 +78,7 @@ export class ItemMoreOptionsComponent { @@ -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);

2
apps/web/src/app/vault/components/vault-items/vault-items.component.ts

@ -285,7 +285,7 @@ export class VaultItemsComponent<C extends CipherViewLike> { @@ -285,7 +285,7 @@ export class VaultItemsComponent<C extends CipherViewLike> {
protected canClone(vaultItem: VaultItem<C>) {
// 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;

Loading…
Cancel
Save