From 7098a243ca03d42f5994dfc863f652b8905b4c5b Mon Sep 17 00:00:00 2001 From: Jason Ng Date: Mon, 7 Oct 2024 11:15:00 -0400 Subject: [PATCH] [PM-10378] Unassigned Items Readonly After Edit Bug Fix (#11340) --- libs/common/src/vault/services/cipher.service.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libs/common/src/vault/services/cipher.service.ts b/libs/common/src/vault/services/cipher.service.ts index a06ca4d793..77e696b5cd 100644 --- a/libs/common/src/vault/services/cipher.service.ts +++ b/libs/common/src/vault/services/cipher.service.ts @@ -673,6 +673,8 @@ export class CipherService implements CipherServiceAbstraction { if (orgAdmin && cipher.organizationId != null) { const request = new CipherCreateRequest(cipher); response = await this.apiService.postCipherAdmin(request); + const data = new CipherData(response, cipher.collectionIds); + return new Cipher(data); } else if (cipher.collectionIds != null) { const request = new CipherCreateRequest(cipher); response = await this.apiService.postCipherCreate(request); @@ -697,6 +699,8 @@ export class CipherService implements CipherServiceAbstraction { if (orgAdmin && isNotClone) { const request = new CipherRequest(cipher); response = await this.apiService.putCipherAdmin(cipher.id, request); + const data = new CipherData(response, cipher.collectionIds); + return new Cipher(data, cipher.localData); } else if (cipher.edit) { const request = new CipherRequest(cipher); response = await this.apiService.putCipher(cipher.id, request);