1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 07:43:35 +00:00

[PM-2383] Bulk collection assignment (#8429)

* [PM-2383] Add bulkUpdateCollectionsWithServer method to CipherService

* [PM-2383] Introduce bulk-collection-assignment-dialog.component

* [PM-2383] Add bulk assign collections option to org vault
This commit is contained in:
Shane Melton
2024-03-22 13:16:29 -07:00
committed by GitHub
parent 905d177873
commit bac0874dc0
13 changed files with 443 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
import { UriMatchStrategySetting } from "../../models/domain/domain-service";
import { SymmetricCryptoKey } from "../../platform/models/domain/symmetric-crypto-key";
import { CipherId, CollectionId, OrganizationId } from "../../types/guid";
import { CipherType } from "../enums/cipher-type";
import { CipherData } from "../models/data/cipher.data";
import { Cipher } from "../models/domain/cipher";
@@ -63,6 +64,19 @@ export abstract class CipherService {
admin?: boolean,
) => Promise<Cipher>;
saveCollectionsWithServer: (cipher: Cipher) => Promise<any>;
/**
* Bulk update collections for many ciphers with the server
* @param orgId
* @param cipherIds
* @param collectionIds
* @param removeCollections - If true, the collections will be removed from the ciphers, otherwise they will be added
*/
bulkUpdateCollectionsWithServer: (
orgId: OrganizationId,
cipherIds: CipherId[],
collectionIds: CollectionId[],
removeCollections: boolean,
) => Promise<void>;
upsert: (cipher: CipherData | CipherData[]) => Promise<any>;
replace: (ciphers: { [id: string]: CipherData }) => Promise<any>;
clear: (userId: string) => Promise<any>;