mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 07:13:32 +00:00
[PM-22241] Add DefaultUserCollectionName support to bulk organization user confirmation (#15873)
* Add bulk user confirmation method to OrganizationUserService * Update OrganizationUserBulkConfirmRequest to include optional defaultUserCollectionName property * Implement conditional bulk user confirmation logic in BulkConfirmDialogComponent. Its gated behind the feature flag for default user collection. * Refactor OrganizationUserBulkConfirmRequest to use SdkEncString for defaultUserCollectionName * Refactor BulkConfirmDialogComponent to use organization object instead of organizationId for improved clarity and type safety. * Add unit tests for OrganizationUserService to validate user single/bulk confirmation logic * Refactor OrganizationUserService to streamline encrypted collection name retrieval by introducing getEncryptedDefaultCollectionName$ method. * Refactor unit tests for OrganizationUserService to reduce duplication by introducing a setupCommonMocks function for common mock configurations. * refactor(organization-user.service): streamline retrieval of encrypted collection name in bulk confirmation process
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { EncString as SdkEncString } from "@bitwarden/sdk-internal";
|
||||
|
||||
type OrganizationUserBulkRequestEntry = {
|
||||
id: string;
|
||||
key: string;
|
||||
@@ -5,8 +7,10 @@ type OrganizationUserBulkRequestEntry = {
|
||||
|
||||
export class OrganizationUserBulkConfirmRequest {
|
||||
keys: OrganizationUserBulkRequestEntry[];
|
||||
defaultUserCollectionName: SdkEncString | undefined;
|
||||
|
||||
constructor(keys: OrganizationUserBulkRequestEntry[]) {
|
||||
constructor(keys: OrganizationUserBulkRequestEntry[], defaultUserCollectionName?: SdkEncString) {
|
||||
this.keys = keys;
|
||||
this.defaultUserCollectionName = defaultUserCollectionName;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user