mirror of
https://github.com/bitwarden/browser
synced 2025-12-06 00:13:28 +00:00
[PM-17213] - allow changing of item owner from personal to org (#13034)
* allow changing of item owner from personal to org * avoid unecessary api calls when updating item parent * move comment up a line * add localData to cipher instance
This commit is contained in:
@@ -93,7 +93,7 @@ export abstract class CipherService implements UserKeyRotationDataProvider<Ciphe
|
||||
organizationId: string,
|
||||
collectionIds: string[],
|
||||
userId: UserId,
|
||||
) => Promise<any>;
|
||||
) => Promise<Cipher>;
|
||||
shareManyWithServer: (
|
||||
ciphers: CipherView[],
|
||||
organizationId: string,
|
||||
|
||||
@@ -786,7 +786,7 @@ export class CipherService implements CipherServiceAbstraction {
|
||||
organizationId: string,
|
||||
collectionIds: string[],
|
||||
userId: UserId,
|
||||
): Promise<any> {
|
||||
): Promise<Cipher> {
|
||||
const attachmentPromises: Promise<any>[] = [];
|
||||
if (cipher.attachments != null) {
|
||||
cipher.attachments.forEach((attachment) => {
|
||||
@@ -806,6 +806,7 @@ export class CipherService implements CipherServiceAbstraction {
|
||||
const response = await this.apiService.putShareCipher(cipher.id, request);
|
||||
const data = new CipherData(response, collectionIds);
|
||||
await this.upsert(data);
|
||||
return new Cipher(data, cipher.localData);
|
||||
}
|
||||
|
||||
async shareManyWithServer(
|
||||
|
||||
Reference in New Issue
Block a user