1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-22 16:29:09 +01:00

[PM-10378] Unassigned Items Readonly After Edit Bug Fix (#11340)

This commit is contained in:
Jason Ng 2024-10-07 11:15:00 -04:00 committed by GitHub
parent c98b4553f2
commit 7098a243ca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -673,6 +673,8 @@ export class CipherService implements CipherServiceAbstraction {
if (orgAdmin && cipher.organizationId != null) { if (orgAdmin && cipher.organizationId != null) {
const request = new CipherCreateRequest(cipher); const request = new CipherCreateRequest(cipher);
response = await this.apiService.postCipherAdmin(request); response = await this.apiService.postCipherAdmin(request);
const data = new CipherData(response, cipher.collectionIds);
return new Cipher(data);
} else if (cipher.collectionIds != null) { } else if (cipher.collectionIds != null) {
const request = new CipherCreateRequest(cipher); const request = new CipherCreateRequest(cipher);
response = await this.apiService.postCipherCreate(request); response = await this.apiService.postCipherCreate(request);
@ -697,6 +699,8 @@ export class CipherService implements CipherServiceAbstraction {
if (orgAdmin && isNotClone) { if (orgAdmin && isNotClone) {
const request = new CipherRequest(cipher); const request = new CipherRequest(cipher);
response = await this.apiService.putCipherAdmin(cipher.id, request); 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) { } else if (cipher.edit) {
const request = new CipherRequest(cipher); const request = new CipherRequest(cipher);
response = await this.apiService.putCipher(cipher.id, request); response = await this.apiService.putCipher(cipher.id, request);