From aa04d84c11f8092077586352f4b2ca91b69c29e7 Mon Sep 17 00:00:00 2001 From: SHASHI KUMAR KASTURI <59004150+kshashikumar@users.noreply.github.com> Date: Tue, 12 Nov 2024 12:47:25 -0500 Subject: [PATCH 1/6] [PM-14627] Import TOTP with ZohoVault CSV importer (#11912) * totp secret is assigned to cipher object in zohovalut-csv-importer to populate when importing keys from zoho vault fixes #11872 closes #11872 * fixed issue#11872 * assigned full totp url to cipher object and also implemented unit tests for zohovault importer * Add test to when no data is passed to the importer * Fix import of folders - Replace "Chambername" with "Folder Name" - Add tests for importing folders and collections --------- Co-authored-by: Daniel James Smith Co-authored-by: Daniel James Smith <2670567+djsmith85@users.noreply.github.com> --- .../zohovault/sample-zohovault-data.csv.ts | 5 ++ .../spec/zohovault-csv-importer.spec.ts | 88 +++++++++++++++++++ .../src/importers/zohovault-csv-importer.ts | 4 +- 3 files changed, 95 insertions(+), 2 deletions(-) create mode 100644 libs/importer/spec/test-data/zohovault/sample-zohovault-data.csv.ts create mode 100644 libs/importer/spec/zohovault-csv-importer.spec.ts diff --git a/libs/importer/spec/test-data/zohovault/sample-zohovault-data.csv.ts b/libs/importer/spec/test-data/zohovault/sample-zohovault-data.csv.ts new file mode 100644 index 00000000000..a95178ffba3 --- /dev/null +++ b/libs/importer/spec/test-data/zohovault/sample-zohovault-data.csv.ts @@ -0,0 +1,5 @@ +export const data = `"Password Name","Description","Password URL","SecretData","Notes","CustomData","Tags","Classification","Favorite","login_totp","Folder Name" +XYZ Test,,https://abc.xyz.de:5001/#/login,"SecretType:Web Account +User Name:email@domain.de +Password:PcY_IQEXIjKGj8YW +",,"",,E,0,otpauth://totp?secret=PI2XO5TW0DF0SHTYOVZXOOBVHFEWM6JU&algorithm=SHA1&period=30&digits=6,folderName`; diff --git a/libs/importer/spec/zohovault-csv-importer.spec.ts b/libs/importer/spec/zohovault-csv-importer.spec.ts new file mode 100644 index 00000000000..28318945291 --- /dev/null +++ b/libs/importer/spec/zohovault-csv-importer.spec.ts @@ -0,0 +1,88 @@ +import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; +import { LoginUriView } from "@bitwarden/common/vault/models/view/login-uri.view"; +import { LoginView } from "@bitwarden/common/vault/models/view/login.view"; + +import { ZohoVaultCsvImporter } from "../src/importers"; + +import { data as samplezohovaultcsvdata } from "./test-data/zohovault/sample-zohovault-data.csv"; + +const CipherData = [ + { + title: "should parse Zoho Vault CSV format", + csv: samplezohovaultcsvdata, + expected: Object.assign(new CipherView(), { + id: null, + organizationId: null, + folderId: null, + name: "XYZ Test", + login: Object.assign(new LoginView(), { + username: "email@domain.de", + password: "PcY_IQEXIjKGj8YW", + uris: [ + Object.assign(new LoginUriView(), { + uri: "https://abc.xyz.de:5001/#/login", + }), + ], + totp: "otpauth://totp?secret=PI2XO5TW0DF0SHTYOVZXOOBVHFEWM6JU&algorithm=SHA1&period=30&digits=6", + }), + type: 1, + favorite: false, + }), + }, +]; + +describe("Zoho Vault CSV Importer", () => { + it("should not succeed given no data", async () => { + const importer = new ZohoVaultCsvImporter(); + const result = await importer.parse(""); + expect(result != null).toBe(true); + expect(result.success).toBe(false); + }); + + CipherData.forEach((data) => { + it(data.title, async () => { + const importer = new ZohoVaultCsvImporter(); + const result = await importer.parse(data.csv); + expect(result != null).toBe(true); + expect(result.ciphers.length).toBeGreaterThan(0); + + const cipher = result.ciphers.shift(); + let property: keyof typeof data.expected; + for (property in data.expected) { + // eslint-disable-next-line + if (data.expected.hasOwnProperty(property)) { + // eslint-disable-next-line + expect(cipher.hasOwnProperty(property)).toBe(true); + expect(cipher[property]).toEqual(data.expected[property]); + } + } + }); + }); + + it("should create folder and assign ciphers", async () => { + const importer = new ZohoVaultCsvImporter(); + const result = await importer.parse(samplezohovaultcsvdata); + expect(result != null).toBe(true); + expect(result.success).toBe(true); + expect(result.ciphers.length).toBeGreaterThan(0); + + const folder = result.folders.shift(); + expect(folder.name).toBe("folderName"); + + expect(result.folderRelationships[0]).toEqual([0, 0]); + }); + + it("should create collection and assign ciphers when importing into an organization", async () => { + const importer = new ZohoVaultCsvImporter(); + importer.organizationId = "someOrgId"; + const result = await importer.parse(samplezohovaultcsvdata); + expect(result != null).toBe(true); + expect(result.success).toBe(true); + expect(result.ciphers.length).toBeGreaterThan(0); + + const collection = result.collections.shift(); + expect(collection.name).toBe("folderName"); + + expect(result.collectionRelationships[0]).toEqual([0, 0]); + }); +}); diff --git a/libs/importer/src/importers/zohovault-csv-importer.ts b/libs/importer/src/importers/zohovault-csv-importer.ts index 6ae4b6a88a3..6a34179e868 100644 --- a/libs/importer/src/importers/zohovault-csv-importer.ts +++ b/libs/importer/src/importers/zohovault-csv-importer.ts @@ -13,7 +13,6 @@ export class ZohoVaultCsvImporter extends BaseImporter implements Importer { result.success = false; return Promise.resolve(result); } - results.forEach((value) => { if ( this.isNullOrWhitespace(value["Password Name"]) && @@ -21,7 +20,7 @@ export class ZohoVaultCsvImporter extends BaseImporter implements Importer { ) { return; } - this.processFolder(result, this.getValueOrDefault(value.ChamberName)); + this.processFolder(result, this.getValueOrDefault(value["Folder Name"])); const cipher = this.initLoginCipher(); cipher.favorite = this.getValueOrDefault(value.Favorite, "0") === "1"; cipher.notes = this.getValueOrDefault(value.Notes); @@ -32,6 +31,7 @@ export class ZohoVaultCsvImporter extends BaseImporter implements Importer { cipher.login.uris = this.makeUriArray( this.getValueOrDefault(value["Password URL"], this.getValueOrDefault(value["Secret URL"])), ); + cipher.login.totp = this.getValueOrDefault(value["login_totp"]); this.parseData(cipher, value.SecretData); this.parseData(cipher, value.CustomData); this.convertToNoteIfNeeded(cipher); From 9ec6f45803d94b7d09cf1171bf87370efa9a965b Mon Sep 17 00:00:00 2001 From: Jason Ng Date: Tue, 12 Nov 2024 12:56:25 -0500 Subject: [PATCH 2/6] [PM-8682] Add Flags for New Device Verification Notice (#11968) --- libs/common/src/enums/feature-flag.enum.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libs/common/src/enums/feature-flag.enum.ts b/libs/common/src/enums/feature-flag.enum.ts index d36aea241d5..bb96e9b3ee1 100644 --- a/libs/common/src/enums/feature-flag.enum.ts +++ b/libs/common/src/enums/feature-flag.enum.ts @@ -40,6 +40,8 @@ export enum FeatureFlag { CriticalApps = "pm-14466-risk-insights-critical-application", TrialPaymentOptional = "PM-8163-trial-payment", SecurityTasks = "security-tasks", + NewDeviceVerificationTemporaryDismiss = "new-device-temporary-dismiss", + NewDeviceVerificationPermanentDismiss = "new-device-permanent-dismiss", } export type AllowedFeatureFlagTypes = boolean | number | string; @@ -90,6 +92,8 @@ export const DefaultFeatureFlagValue = { [FeatureFlag.CriticalApps]: FALSE, [FeatureFlag.TrialPaymentOptional]: FALSE, [FeatureFlag.SecurityTasks]: FALSE, + [FeatureFlag.NewDeviceVerificationTemporaryDismiss]: FALSE, + [FeatureFlag.NewDeviceVerificationPermanentDismiss]: FALSE, } satisfies Record; export type DefaultFeatureFlagValueType = typeof DefaultFeatureFlagValue; From ea2f95e2268bd1a94e6b99b853b4aa51f228bc44 Mon Sep 17 00:00:00 2001 From: Chandra Mauli Sharma Date: Wed, 13 Nov 2024 01:07:44 +0530 Subject: [PATCH 3/6] fix: Add new item should set item type (bitwarden#10994) (#11049) Co-authored-by: cd-bitwarden <106776772+cd-bitwarden@users.noreply.github.com> --- apps/desktop/src/vault/app/vault/vault.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/desktop/src/vault/app/vault/vault.component.ts b/apps/desktop/src/vault/app/vault/vault.component.ts index b6357b35d7b..54d8eb833f4 100644 --- a/apps/desktop/src/vault/app/vault/vault.component.ts +++ b/apps/desktop/src/vault/app/vault/vault.component.ts @@ -428,7 +428,7 @@ export class VaultComponent implements OnInit, OnDestroy { return; } - this.addType = type; + this.addType = type || this.activeFilter.cipherType; this.action = "add"; this.cipherId = null; this.prefillNewCipherFromFilter(); From e32bfce09447381f8bf415174048f1e3ef469b18 Mon Sep 17 00:00:00 2001 From: Jared McCannon Date: Tue, 12 Nov 2024 13:52:11 -0600 Subject: [PATCH 4/6] [PM-12479] Updating retrieval of groups (#11800) * Renamed group service to group api service * Updating models in various components. * Updating internal service name. clean up. --------- Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com> Co-authored-by: Matt Bishop --- ...{group.service.ts => group-api.service.ts} | 28 ++++++++++--- .../organizations/core/services/index.ts | 2 +- .../core/views/add-edit-group-detail.ts | 10 +++++ .../core/views/group-details.view.ts | 20 ++++++++++ .../organizations/core/views/group.view.ts | 13 +------ .../organizations/core/views/index.ts | 1 + .../manage/group-add-edit.component.ts | 39 ++++++++++++------- .../organizations/manage/groups.component.ts | 6 +-- .../member-dialog/member-dialog.component.ts | 16 ++++---- .../members/members.component.ts | 4 +- .../collection-dialog.component.ts | 4 +- .../bulk-collections-dialog.component.ts | 4 +- .../app/vault/org-vault/vault.component.ts | 4 +- 13 files changed, 99 insertions(+), 52 deletions(-) rename apps/web/src/app/admin-console/organizations/core/services/group/{group.service.ts => group-api.service.ts} (78%) create mode 100644 apps/web/src/app/admin-console/organizations/core/views/add-edit-group-detail.ts create mode 100644 apps/web/src/app/admin-console/organizations/core/views/group-details.view.ts diff --git a/apps/web/src/app/admin-console/organizations/core/services/group/group.service.ts b/apps/web/src/app/admin-console/organizations/core/services/group/group-api.service.ts similarity index 78% rename from apps/web/src/app/admin-console/organizations/core/services/group/group.service.ts rename to apps/web/src/app/admin-console/organizations/core/services/group/group-api.service.ts index e06a9aa8dc7..3b933ab9854 100644 --- a/apps/web/src/app/admin-console/organizations/core/services/group/group.service.ts +++ b/apps/web/src/app/admin-console/organizations/core/services/group/group-api.service.ts @@ -6,8 +6,10 @@ import { ListResponse } from "@bitwarden/common/models/response/list.response"; import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service"; import { CoreOrganizationModule } from "../../core-organization.module"; +import { GroupDetailsView } from "../../views/group-details.view"; import { GroupView } from "../../views/group.view"; +import { AddEditGroupDetail } from "./../../views/add-edit-group-detail"; import { GroupRequest } from "./requests/group.request"; import { OrganizationGroupBulkRequest } from "./requests/organization-group-bulk.request"; import { GroupDetailsResponse, GroupResponse } from "./responses/group.response"; @@ -15,13 +17,13 @@ import { GroupDetailsResponse, GroupResponse } from "./responses/group.response" @Injectable({ providedIn: "root", }) -export class GroupService { +export class GroupApiService { constructor( protected apiService: ApiService, protected configService: ConfigService, ) {} - async get(orgId: string, groupId: string): Promise { + async get(orgId: string, groupId: string): Promise { const r = await this.apiService.send( "GET", "/organizations/" + orgId + "/groups/" + groupId + "/details", @@ -30,7 +32,7 @@ export class GroupService { true, ); - return GroupView.fromResponse(new GroupDetailsResponse(r)); + return GroupDetailsView.fromResponse(new GroupDetailsResponse(r)); } async getAll(orgId: string): Promise { @@ -44,12 +46,26 @@ export class GroupService { const listResponse = new ListResponse(r, GroupDetailsResponse); - return Promise.all(listResponse.data?.map((gr) => GroupView.fromResponse(gr))) ?? []; + return listResponse.data.map((gr) => GroupView.fromResponse(gr)); + } + + async getAllDetails(orgId: string): Promise { + const r = await this.apiService.send( + "GET", + "/organizations/" + orgId + "/groups/details", + null, + true, + true, + ); + + const listResponse = new ListResponse(r, GroupDetailsResponse); + + return listResponse.data.map((gr) => GroupDetailsView.fromResponse(gr)); } } @Injectable({ providedIn: CoreOrganizationModule }) -export class InternalGroupService extends GroupService { +export class InternalGroupApiService extends GroupApiService { constructor( protected apiService: ApiService, protected configService: ConfigService, @@ -77,7 +93,7 @@ export class InternalGroupService extends GroupService { ); } - async save(group: GroupView): Promise { + async save(group: AddEditGroupDetail): Promise { const request = new GroupRequest(); request.name = group.name; request.users = group.members; diff --git a/apps/web/src/app/admin-console/organizations/core/services/index.ts b/apps/web/src/app/admin-console/organizations/core/services/index.ts index 627cb2416ae..88cd6f8763c 100644 --- a/apps/web/src/app/admin-console/organizations/core/services/index.ts +++ b/apps/web/src/app/admin-console/organizations/core/services/index.ts @@ -1,2 +1,2 @@ -export * from "./group/group.service"; +export * from "./group/group-api.service"; export * from "./user-admin.service"; diff --git a/apps/web/src/app/admin-console/organizations/core/views/add-edit-group-detail.ts b/apps/web/src/app/admin-console/organizations/core/views/add-edit-group-detail.ts new file mode 100644 index 00000000000..83fe65c07a9 --- /dev/null +++ b/apps/web/src/app/admin-console/organizations/core/views/add-edit-group-detail.ts @@ -0,0 +1,10 @@ +import { CollectionAccessSelectionView } from "@bitwarden/admin-console/common"; + +export interface AddEditGroupDetail { + id: string; + organizationId: string; + name: string; + externalId: string; + collections: CollectionAccessSelectionView[]; + members: string[]; +} diff --git a/apps/web/src/app/admin-console/organizations/core/views/group-details.view.ts b/apps/web/src/app/admin-console/organizations/core/views/group-details.view.ts new file mode 100644 index 00000000000..efa6b9daf79 --- /dev/null +++ b/apps/web/src/app/admin-console/organizations/core/views/group-details.view.ts @@ -0,0 +1,20 @@ +import { CollectionAccessSelectionView } from "@bitwarden/admin-console/common"; +import { View } from "@bitwarden/common/models/view/view"; + +import { GroupDetailsResponse } from "../services/group/responses/group.response"; + +export class GroupDetailsView implements View { + id: string; + organizationId: string; + name: string; + externalId: string; + collections: CollectionAccessSelectionView[] = []; + + static fromResponse(response: GroupDetailsResponse): GroupDetailsView { + const view: GroupDetailsView = Object.assign(new GroupDetailsView(), response); + + view.collections = response.collections.map((c) => new CollectionAccessSelectionView(c)); + + return view; + } +} diff --git a/apps/web/src/app/admin-console/organizations/core/views/group.view.ts b/apps/web/src/app/admin-console/organizations/core/views/group.view.ts index 2566e4c4bfa..10ec61142ce 100644 --- a/apps/web/src/app/admin-console/organizations/core/views/group.view.ts +++ b/apps/web/src/app/admin-console/organizations/core/views/group.view.ts @@ -1,23 +1,14 @@ -import { CollectionAccessSelectionView } from "@bitwarden/admin-console/common"; import { View } from "@bitwarden/common/models/view/view"; -import { GroupDetailsResponse, GroupResponse } from "../services/group/responses/group.response"; +import { GroupResponse } from "../services/group/responses/group.response"; export class GroupView implements View { id: string; organizationId: string; name: string; externalId: string; - collections: CollectionAccessSelectionView[] = []; - members: string[] = []; static fromResponse(response: GroupResponse): GroupView { - const view: GroupView = Object.assign(new GroupView(), response) as GroupView; - - if (response instanceof GroupDetailsResponse && response.collections != undefined) { - view.collections = response.collections.map((c) => new CollectionAccessSelectionView(c)); - } - - return view; + return Object.assign(new GroupView(), response); } } diff --git a/apps/web/src/app/admin-console/organizations/core/views/index.ts b/apps/web/src/app/admin-console/organizations/core/views/index.ts index 9408d7757c3..847b2271766 100644 --- a/apps/web/src/app/admin-console/organizations/core/views/index.ts +++ b/apps/web/src/app/admin-console/organizations/core/views/index.ts @@ -1,3 +1,4 @@ export * from "./group.view"; +export * from "./group-details.view"; export * from "./organization-user.view"; export * from "./organization-user-admin-view"; diff --git a/apps/web/src/app/admin-console/organizations/manage/group-add-edit.component.ts b/apps/web/src/app/admin-console/organizations/manage/group-add-edit.component.ts index 643e76e4c38..c16b2e57241 100644 --- a/apps/web/src/app/admin-console/organizations/manage/group-add-edit.component.ts +++ b/apps/web/src/app/admin-console/organizations/manage/group-add-edit.component.ts @@ -30,7 +30,7 @@ import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/pl import { UserId } from "@bitwarden/common/types/guid"; import { DialogService, ToastService } from "@bitwarden/components"; -import { InternalGroupService as GroupService, GroupView } from "../core"; +import { InternalGroupApiService as GroupService } from "../core"; import { AccessItemType, AccessItemValue, @@ -40,6 +40,8 @@ import { PermissionMode, } from "../shared/components/access-selector"; +import { AddEditGroupDetail } from "./../core/views/add-edit-group-detail"; + /** * Indices for the available tabs in the dialog */ @@ -105,7 +107,7 @@ export class GroupAddEditComponent implements OnInit, OnDestroy { title: string; collections: AccessItemView[] = []; members: Array = []; - group: GroupView; + group: AddEditGroupDetail; groupForm = this.formBuilder.group({ name: ["", [Validators.required, Validators.maxLength(100)]], @@ -149,7 +151,7 @@ export class GroupAddEditComponent implements OnInit, OnDestroy { ); } - private groupDetails$: Observable = of(this.editMode).pipe( + private groupDetails$: Observable = of(this.editMode).pipe( concatMap((editMode) => { if (!editMode) { return of(undefined); @@ -159,9 +161,11 @@ export class GroupAddEditComponent implements OnInit, OnDestroy { this.groupService.get(this.organizationId, this.groupId), this.apiService.getGroupUsers(this.organizationId, this.groupId), ]).pipe( - map(([groupView, users]) => { - groupView.members = users; - return groupView; + map(([groupView, users]): AddEditGroupDetail => { + return { + ...groupView, + members: users, + }; }), catchError((e: unknown) => { if (e instanceof ErrorResponse) { @@ -295,14 +299,16 @@ export class GroupAddEditComponent implements OnInit, OnDestroy { return; } - const groupView = new GroupView(); - groupView.id = this.groupId; - groupView.organizationId = this.organizationId; - const formValue = this.groupForm.value; - groupView.name = formValue.name; - groupView.members = formValue.members?.map((m) => m.id) ?? []; - groupView.collections = formValue.collections.map((c) => convertToSelectionView(c)); + + const groupView: AddEditGroupDetail = { + id: this.groupId, + organizationId: this.organizationId, + name: formValue.name, + members: formValue.members?.map((m) => m.id) ?? [], + collections: formValue.collections.map((c) => convertToSelectionView(c)), + externalId: formValue.externalId, + }; await this.groupService.save(groupView); @@ -346,7 +352,10 @@ export class GroupAddEditComponent implements OnInit, OnDestroy { /** * Maps the group's current collection access to AccessItemValues to populate the access-selector's FormControl */ -function mapToAccessSelections(group: GroupView, items: AccessItemView[]): AccessItemValue[] { +function mapToAccessSelections( + group: AddEditGroupDetail, + items: AccessItemView[], +): AccessItemValue[] { return ( group.collections // The FormControl value only represents editable collection access - exclude readonly access selections @@ -365,7 +374,7 @@ function mapToAccessSelections(group: GroupView, items: AccessItemView[]): Acces function mapToAccessItemViews( collections: CollectionAdminView[], organization: Organization, - group?: GroupView, + group?: AddEditGroupDetail, ): AccessItemView[] { return ( collections diff --git a/apps/web/src/app/admin-console/organizations/manage/groups.component.ts b/apps/web/src/app/admin-console/organizations/manage/groups.component.ts index 7d660682a2d..dd0cde70e67 100644 --- a/apps/web/src/app/admin-console/organizations/manage/groups.component.ts +++ b/apps/web/src/app/admin-console/organizations/manage/groups.component.ts @@ -28,7 +28,7 @@ import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.servic import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { DialogService, TableDataSource, ToastService } from "@bitwarden/components"; -import { InternalGroupService as GroupService, GroupView } from "../core"; +import { GroupDetailsView, InternalGroupApiService as GroupService } from "../core"; import { GroupAddEditDialogResultType, @@ -40,7 +40,7 @@ type GroupDetailsRow = { /** * Details used for displaying group information */ - details: GroupView; + details: GroupDetailsView; /** * True if the group is selected in the table @@ -108,7 +108,7 @@ export class GroupsComponent { ), // groups this.refreshGroups$.pipe( - switchMap(() => this.groupService.getAll(this.organizationId)), + switchMap(() => this.groupService.getAllDetails(this.organizationId)), ), ]), ), diff --git a/apps/web/src/app/admin-console/organizations/members/components/member-dialog/member-dialog.component.ts b/apps/web/src/app/admin-console/organizations/members/components/member-dialog/member-dialog.component.ts index 75c943fe579..04df2957f91 100644 --- a/apps/web/src/app/admin-console/organizations/members/components/member-dialog/member-dialog.component.ts +++ b/apps/web/src/app/admin-console/organizations/members/components/member-dialog/member-dialog.component.ts @@ -35,8 +35,8 @@ import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.servic import { DialogService, ToastService } from "@bitwarden/components"; import { - GroupService, - GroupView, + GroupApiService, + GroupDetailsView, OrganizationUserAdminView, UserAdminService, } from "../../../core"; @@ -144,7 +144,7 @@ export class MemberDialogComponent implements OnDestroy { private formBuilder: FormBuilder, // TODO: We should really look into consolidating naming conventions for these services private collectionAdminService: CollectionAdminService, - private groupService: GroupService, + private groupService: GroupApiService, private userService: UserAdminService, private organizationUserApiService: OrganizationUserApiService, private dialogService: DialogService, @@ -171,8 +171,8 @@ export class MemberDialogComponent implements OnDestroy { const groups$ = this.organization$.pipe( switchMap((organization) => organization.useGroups - ? this.groupService.getAll(this.params.organizationId) - : of([] as GroupView[]), + ? this.groupService.getAllDetails(this.params.organizationId) + : of([] as GroupDetailsView[]), ), ); @@ -278,7 +278,7 @@ export class MemberDialogComponent implements OnDestroy { private loadOrganizationUser( userDetails: OrganizationUserAdminView, - groups: GroupView[], + groups: GroupDetailsView[], collections: CollectionAdminView[], organization: Organization, ) { @@ -635,7 +635,7 @@ function mapCollectionToAccessItemView( collection: CollectionAdminView, organization: Organization, accessSelection?: CollectionAccessSelectionView, - group?: GroupView, + group?: GroupDetailsView, ): AccessItemView { return { type: AccessItemType.Collection, @@ -648,7 +648,7 @@ function mapCollectionToAccessItemView( }; } -function mapGroupToAccessItemView(group: GroupView): AccessItemView { +function mapGroupToAccessItemView(group: GroupDetailsView): AccessItemView { return { type: AccessItemType.Group, id: group.id, diff --git a/apps/web/src/app/admin-console/organizations/members/members.component.ts b/apps/web/src/app/admin-console/organizations/members/members.component.ts index f49fb13d6c8..f1cd505de0a 100644 --- a/apps/web/src/app/admin-console/organizations/members/members.component.ts +++ b/apps/web/src/app/admin-console/organizations/members/members.component.ts @@ -56,7 +56,7 @@ import { } from "../../../billing/organizations/change-plan-dialog.component"; import { BaseMembersComponent } from "../../common/base-members.component"; import { PeopleTableDataSource } from "../../common/people-table-data-source"; -import { GroupService } from "../core"; +import { GroupApiService } from "../core"; import { OrganizationUserView } from "../core/views/organization-user.view"; import { openEntityEventsDialog } from "../manage/entity-events.component"; @@ -129,7 +129,7 @@ export class MembersComponent extends BaseMembersComponent private organizationApiService: OrganizationApiServiceAbstraction, private organizationUserApiService: OrganizationUserApiService, private router: Router, - private groupService: GroupService, + private groupService: GroupApiService, private collectionService: CollectionService, private billingApiService: BillingApiServiceAbstraction, private modalService: ModalService, diff --git a/apps/web/src/app/vault/components/collection-dialog/collection-dialog.component.ts b/apps/web/src/app/vault/components/collection-dialog/collection-dialog.component.ts index a51d408bc74..514d0f8b625 100644 --- a/apps/web/src/app/vault/components/collection-dialog/collection-dialog.component.ts +++ b/apps/web/src/app/vault/components/collection-dialog/collection-dialog.component.ts @@ -29,7 +29,7 @@ import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/pl import { Utils } from "@bitwarden/common/platform/misc/utils"; import { BitValidators, DialogService } from "@bitwarden/components"; -import { GroupService, GroupView } from "../../../admin-console/organizations/core"; +import { GroupApiService, GroupView } from "../../../admin-console/organizations/core"; import { PermissionMode } from "../../../admin-console/organizations/shared/components/access-selector/access-selector.component"; import { AccessItemType, @@ -101,7 +101,7 @@ export class CollectionDialogComponent implements OnInit, OnDestroy { private formBuilder: FormBuilder, private dialogRef: DialogRef, private organizationService: OrganizationService, - private groupService: GroupService, + private groupService: GroupApiService, private collectionAdminService: CollectionAdminService, private i18nService: I18nService, private platformUtilsService: PlatformUtilsService, diff --git a/apps/web/src/app/vault/org-vault/bulk-collections-dialog/bulk-collections-dialog.component.ts b/apps/web/src/app/vault/org-vault/bulk-collections-dialog/bulk-collections-dialog.component.ts index c8c9b83efcb..f86a321dfbd 100644 --- a/apps/web/src/app/vault/org-vault/bulk-collections-dialog/bulk-collections-dialog.component.ts +++ b/apps/web/src/app/vault/org-vault/bulk-collections-dialog/bulk-collections-dialog.component.ts @@ -14,7 +14,7 @@ import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.servic import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { DialogService } from "@bitwarden/components"; -import { GroupService, GroupView } from "../../../admin-console/organizations/core"; +import { GroupApiService, GroupView } from "../../../admin-console/organizations/core"; import { AccessItemType, AccessItemValue, @@ -61,7 +61,7 @@ export class BulkCollectionsDialogComponent implements OnDestroy { private dialogRef: DialogRef, private formBuilder: FormBuilder, private organizationService: OrganizationService, - private groupService: GroupService, + private groupService: GroupApiService, private organizationUserApiService: OrganizationUserApiService, private platformUtilsService: PlatformUtilsService, private i18nService: I18nService, diff --git a/apps/web/src/app/vault/org-vault/vault.component.ts b/apps/web/src/app/vault/org-vault/vault.component.ts index 743e080befe..dee584f3a42 100644 --- a/apps/web/src/app/vault/org-vault/vault.component.ts +++ b/apps/web/src/app/vault/org-vault/vault.component.ts @@ -81,7 +81,7 @@ import { PasswordRepromptService, } from "@bitwarden/vault"; -import { GroupService, GroupView } from "../../admin-console/organizations/core"; +import { GroupApiService, GroupView } from "../../admin-console/organizations/core"; import { openEntityEventsDialog } from "../../admin-console/organizations/manage/entity-events.component"; import { TrialFlowService } from "../../billing/services/trial-flow.service"; import { FreeTrial } from "../../core/types/free-trial"; @@ -234,7 +234,7 @@ export class VaultComponent implements OnInit, OnDestroy { private collectionAdminService: CollectionAdminService, private searchService: SearchService, private searchPipe: SearchPipe, - private groupService: GroupService, + private groupService: GroupApiService, private logService: LogService, private eventCollectionService: EventCollectionService, private totpService: TotpService, From d40dedf2b31487935ea01cef50e17246975939ef Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 12 Nov 2024 15:00:07 -0500 Subject: [PATCH 5/6] [deps] Platform: Update @types/node to v22 (#11951) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .../package-lock.json | 10 +++++----- .../native-messaging-test-runner/package.json | 2 +- package-lock.json | 20 ++++++++++++++----- package.json | 2 +- 4 files changed, 22 insertions(+), 12 deletions(-) diff --git a/apps/desktop/native-messaging-test-runner/package-lock.json b/apps/desktop/native-messaging-test-runner/package-lock.json index f57f067907a..f51c0a32d9d 100644 --- a/apps/desktop/native-messaging-test-runner/package-lock.json +++ b/apps/desktop/native-messaging-test-runner/package-lock.json @@ -18,7 +18,7 @@ "yargs": "17.7.2" }, "devDependencies": { - "@types/node": "20.17.1", + "@types/node": "22.9.0", "@types/node-ipc": "9.2.3", "typescript": "4.7.4" } @@ -106,12 +106,12 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "20.17.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.1.tgz", - "integrity": "sha512-j2VlPv1NnwPJbaCNv69FO/1z4lId0QmGvpT41YxitRtWlg96g/j8qcv2RKsLKe2F6OJgyXhupN1Xo17b2m139Q==", + "version": "22.9.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.0.tgz", + "integrity": "sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ==", "license": "MIT", "dependencies": { - "undici-types": "~6.19.2" + "undici-types": "~6.19.8" } }, "node_modules/@types/node-ipc": { diff --git a/apps/desktop/native-messaging-test-runner/package.json b/apps/desktop/native-messaging-test-runner/package.json index ed2c4bb29cf..23b1dbdafba 100644 --- a/apps/desktop/native-messaging-test-runner/package.json +++ b/apps/desktop/native-messaging-test-runner/package.json @@ -23,7 +23,7 @@ "yargs": "17.7.2" }, "devDependencies": { - "@types/node": "20.17.1", + "@types/node": "22.9.0", "@types/node-ipc": "9.2.3", "typescript": "4.7.4" }, diff --git a/package-lock.json b/package-lock.json index e71e8c387d7..d1c86b07071 100644 --- a/package-lock.json +++ b/package-lock.json @@ -111,7 +111,7 @@ "@types/koa-json": "2.0.23", "@types/lowdb": "1.0.15", "@types/lunr": "2.3.7", - "@types/node": "20.17.1", + "@types/node": "22.9.0", "@types/node-fetch": "2.6.4", "@types/node-forge": "1.3.11", "@types/node-ipc": "9.2.3", @@ -9770,13 +9770,13 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "20.17.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.1.tgz", - "integrity": "sha512-j2VlPv1NnwPJbaCNv69FO/1z4lId0QmGvpT41YxitRtWlg96g/j8qcv2RKsLKe2F6OJgyXhupN1Xo17b2m139Q==", + "version": "22.9.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.0.tgz", + "integrity": "sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~6.19.2" + "undici-types": "~6.19.8" } }, "node_modules/@types/node-fetch": { @@ -16588,6 +16588,16 @@ "node": ">=10" } }, + "node_modules/electron/node_modules/@types/node": { + "version": "20.17.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.6.tgz", + "integrity": "sha512-VEI7OdvK2wP7XHnsuXbAJnEpEkF6NjSN45QJlL4VGqZSXsnicpesdTWsg9RISeSdYd3yeRj/y3k5KGjUXYnFwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.19.2" + } + }, "node_modules/emitter-component": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/emitter-component/-/emitter-component-1.1.2.tgz", diff --git a/package.json b/package.json index 282a63f2351..1cd370b9778 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,7 @@ "@types/koa-json": "2.0.23", "@types/lowdb": "1.0.15", "@types/lunr": "2.3.7", - "@types/node": "20.17.1", + "@types/node": "22.9.0", "@types/node-fetch": "2.6.4", "@types/node-forge": "1.3.11", "@types/node-ipc": "9.2.3", From c49679207bb8418dd3da3514bba07c395671557d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 12 Nov 2024 15:03:53 -0500 Subject: [PATCH 6/6] [deps] Autofill: Update concurrently to v9.1.0 (#11949) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index d1c86b07071..84ff0b47c1d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -128,7 +128,7 @@ "base64-loader": "1.0.0", "browserslist": "4.23.2", "chromatic": "11.10.2", - "concurrently": "9.0.1", + "concurrently": "9.1.0", "copy-webpack-plugin": "12.0.2", "cross-env": "7.0.3", "css-loader": "7.1.2", @@ -14538,9 +14538,9 @@ } }, "node_modules/concurrently": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-9.0.1.tgz", - "integrity": "sha512-wYKvCd/f54sTXJMSfV6Ln/B8UrfLBKOYa+lzc6CHay3Qek+LorVSBdMVfyewFhRbH0Rbabsk4D+3PL/VjQ5gzg==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-9.1.0.tgz", + "integrity": "sha512-VxkzwMAn4LP7WyMnJNbHN5mKV9L2IbyDjpzemKr99sXNR3GqRNMMHdm7prV1ws9wg7ETj6WUkNOigZVsptwbgg==", "dev": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 1cd370b9778..7e70df5b515 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "base64-loader": "1.0.0", "browserslist": "4.23.2", "chromatic": "11.10.2", - "concurrently": "9.0.1", + "concurrently": "9.1.0", "copy-webpack-plugin": "12.0.2", "cross-env": "7.0.3", "css-loader": "7.1.2",