mirror of
https://github.com/bitwarden/browser
synced 2025-12-10 05:13:29 +00:00
[PM-23788] changed the getType for canClone to address new cipherLike (#15829)
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user