diff --git a/apps/web/src/app/admin-console/organizations/shared/components/access-selector/access-selector.models.ts b/apps/web/src/app/admin-console/organizations/shared/components/access-selector/access-selector.models.ts
index 8e823c675a..06e1298a17 100644
--- a/apps/web/src/app/admin-console/organizations/shared/components/access-selector/access-selector.models.ts
+++ b/apps/web/src/app/admin-console/organizations/shared/components/access-selector/access-selector.models.ts
@@ -1,10 +1,11 @@
+import { OrganizationUserUserDetailsResponse } from "@bitwarden/common/abstractions/organization-user/responses";
import {
OrganizationUserStatusType,
OrganizationUserType,
} from "@bitwarden/common/admin-console/enums";
import { SelectItemView } from "@bitwarden/components";
-import { CollectionAccessSelectionView } from "../../../core";
+import { CollectionAccessSelectionView, GroupView } from "../../../core";
/**
* Permission options that replace/correspond with manage, readOnly, and hidePassword server fields.
@@ -111,3 +112,29 @@ const readOnly = (perm: CollectionPermission) =>
const hidePassword = (perm: CollectionPermission) =>
[CollectionPermission.ViewExceptPass, CollectionPermission.EditExceptPass].includes(perm);
+
+export function mapGroupToAccessItemView(group: GroupView): AccessItemView {
+ return {
+ id: group.id,
+ type: AccessItemType.Group,
+ listName: group.name,
+ labelName: group.name,
+ accessAllItems: group.accessAll,
+ readonly: group.accessAll,
+ };
+}
+
+// TODO: Use view when user apis are migrated to a service
+export function mapUserToAccessItemView(user: OrganizationUserUserDetailsResponse): AccessItemView {
+ return {
+ id: user.id,
+ type: AccessItemType.Member,
+ email: user.email,
+ role: user.type,
+ listName: user.name?.length > 0 ? `${user.name} (${user.email})` : user.email,
+ labelName: user.name ?? user.email,
+ status: user.status,
+ accessAllItems: user.accessAll,
+ readonly: user.accessAll,
+ };
+}
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 34829f58b6..5fdc1317da 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
@@ -13,7 +13,6 @@ import {
} from "rxjs";
import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service";
-import { OrganizationUserUserDetailsResponse } from "@bitwarden/common/abstractions/organization-user/responses";
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
import { Organization } from "@bitwarden/common/admin-console/models/domain/organization";
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
@@ -26,11 +25,13 @@ import { DialogService, BitValidators } from "@bitwarden/components";
import { GroupService, GroupView } from "../../../admin-console/organizations/core";
import { PermissionMode } from "../../../admin-console/organizations/shared/components/access-selector/access-selector.component";
import {
- AccessItemView,
- AccessItemValue,
AccessItemType,
- convertToSelectionView,
+ AccessItemValue,
+ AccessItemView,
convertToPermission,
+ convertToSelectionView,
+ mapGroupToAccessItemView,
+ mapUserToAccessItemView,
} from "../../../admin-console/organizations/shared/components/access-selector/access-selector.models";
import { CollectionAdminService } from "../../core/collection-admin.service";
import { CollectionAdminView } from "../../core/views/collection-admin.view";
@@ -284,32 +285,6 @@ function parseName(collection: CollectionView) {
return { name, parent };
}
-function mapGroupToAccessItemView(group: GroupView): AccessItemView {
- return {
- id: group.id,
- type: AccessItemType.Group,
- listName: group.name,
- labelName: group.name,
- accessAllItems: group.accessAll,
- readonly: group.accessAll,
- };
-}
-
-// TODO: Use view when user apis are migrated to a service
-function mapUserToAccessItemView(user: OrganizationUserUserDetailsResponse): AccessItemView {
- return {
- id: user.id,
- type: AccessItemType.Member,
- email: user.email,
- role: user.type,
- listName: user.name?.length > 0 ? `${user.name} (${user.email})` : user.email,
- labelName: user.name ?? user.email,
- status: user.status,
- accessAllItems: user.accessAll,
- readonly: user.accessAll,
- };
-}
-
function mapToAccessSelections(collectionDetails: CollectionAdminView): AccessItemValue[] {
if (collectionDetails == undefined) {
return [];
diff --git a/apps/web/src/app/vault/components/vault-items/vault-item-event.ts b/apps/web/src/app/vault/components/vault-items/vault-item-event.ts
index cacd13829f..c20e85fdea 100644
--- a/apps/web/src/app/vault/components/vault-items/vault-item-event.ts
+++ b/apps/web/src/app/vault/components/vault-items/vault-item-event.ts
@@ -7,6 +7,7 @@ export type VaultItemEvent =
| { type: "viewAttachments"; item: CipherView }
| { type: "viewCollections"; item: CipherView }
| { type: "viewAccess"; item: CollectionView }
+ | { type: "bulkEditCollectionAccess"; items: CollectionView[] }
| { type: "viewEvents"; item: CipherView }
| { type: "edit"; item: CollectionView }
| { type: "clone"; item: CipherView }
diff --git a/apps/web/src/app/vault/components/vault-items/vault-items.component.html b/apps/web/src/app/vault/components/vault-items/vault-items.component.html
index a9be8dbf1e..44dd95f81d 100644
--- a/apps/web/src/app/vault/components/vault-items/vault-items.component.html
+++ b/apps/web/src/app/vault/components/vault-items/vault-items.component.html
@@ -34,6 +34,15 @@
{{ "moveSelected" | i18n }}
+