diff --git a/apps/cli/src/admin-console/models/selection-read-only.ts b/apps/cli/src/admin-console/models/selection-read-only.ts
index 48c4399120d..8b003c05b57 100644
--- a/apps/cli/src/admin-console/models/selection-read-only.ts
+++ b/apps/cli/src/admin-console/models/selection-read-only.ts
@@ -1,15 +1,17 @@
export class SelectionReadOnly {
static template(): SelectionReadOnly {
- return new SelectionReadOnly("00000000-0000-0000-0000-000000000000", false, false);
+ return new SelectionReadOnly("00000000-0000-0000-0000-000000000000", false, false, false);
}
id: string;
readOnly: boolean;
hidePasswords: boolean;
+ manage: boolean;
- constructor(id: string, readOnly: boolean, hidePasswords: boolean) {
+ constructor(id: string, readOnly: boolean, hidePasswords: boolean, manage: boolean) {
this.id = id;
this.readOnly = readOnly;
this.hidePasswords = hidePasswords || false;
+ this.manage = manage;
}
}
diff --git a/apps/cli/src/commands/edit.command.ts b/apps/cli/src/commands/edit.command.ts
index 60e5ee7936e..bee1c6849fe 100644
--- a/apps/cli/src/commands/edit.command.ts
+++ b/apps/cli/src/commands/edit.command.ts
@@ -169,7 +169,9 @@ export class EditCommand {
const groups =
req.groups == null
? null
- : req.groups.map((g) => new SelectionReadOnlyRequest(g.id, g.readOnly, g.hidePasswords));
+ : req.groups.map(
+ (g) => new SelectionReadOnlyRequest(g.id, g.readOnly, g.hidePasswords, g.manage)
+ );
const request = new CollectionRequest();
request.name = (await this.cryptoService.encrypt(req.name, orgKey)).encryptedString;
request.externalId = req.externalId;
diff --git a/apps/cli/src/commands/get.command.ts b/apps/cli/src/commands/get.command.ts
index 4a84f1efefd..5e1552066ad 100644
--- a/apps/cli/src/commands/get.command.ts
+++ b/apps/cli/src/commands/get.command.ts
@@ -427,7 +427,9 @@ export class GetCommand extends DownloadCommand {
const groups =
response.groups == null
? null
- : response.groups.map((g) => new SelectionReadOnly(g.id, g.readOnly, g.hidePasswords));
+ : response.groups.map(
+ (g) => new SelectionReadOnly(g.id, g.readOnly, g.hidePasswords, g.manage)
+ );
const res = new OrganizationCollectionResponse(decCollection, groups);
return Response.success(res);
} catch (e) {
diff --git a/apps/cli/src/vault/create.command.ts b/apps/cli/src/vault/create.command.ts
index 01217dbc307..fcef368d53d 100644
--- a/apps/cli/src/vault/create.command.ts
+++ b/apps/cli/src/vault/create.command.ts
@@ -184,7 +184,9 @@ export class CreateCommand {
const groups =
req.groups == null
? null
- : req.groups.map((g) => new SelectionReadOnlyRequest(g.id, g.readOnly, g.hidePasswords));
+ : req.groups.map(
+ (g) => new SelectionReadOnlyRequest(g.id, g.readOnly, g.hidePasswords, g.manage)
+ );
const request = new CollectionRequest();
request.name = (await this.cryptoService.encrypt(req.name, orgKey)).encryptedString;
request.externalId = req.externalId;
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.service.ts
index 680c358b1fb..65687bdf750 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.service.ts
@@ -76,7 +76,7 @@ export class InternalGroupService extends GroupService {
request.accessAll = group.accessAll;
request.users = group.members;
request.collections = group.collections.map(
- (c) => new SelectionReadOnlyRequest(c.id, c.readOnly, c.hidePasswords)
+ (c) => new SelectionReadOnlyRequest(c.id, c.readOnly, c.hidePasswords, c.manage)
);
if (group.id == undefined) {
diff --git a/apps/web/src/app/admin-console/organizations/core/services/user-admin.service.ts b/apps/web/src/app/admin-console/organizations/core/services/user-admin.service.ts
index 4b1cb6467dc..9e1889f7fa3 100644
--- a/apps/web/src/app/admin-console/organizations/core/services/user-admin.service.ts
+++ b/apps/web/src/app/admin-console/organizations/core/services/user-admin.service.ts
@@ -80,6 +80,7 @@ export class UserAdminService {
id: c.id,
hidePasswords: c.hidePasswords,
readOnly: c.readOnly,
+ manage: c.manage,
}));
view.groups = u.groups;
view.accessSecretsManager = u.accessSecretsManager;
diff --git a/apps/web/src/app/admin-console/organizations/core/views/collection-access-selection.view.ts b/apps/web/src/app/admin-console/organizations/core/views/collection-access-selection.view.ts
index 38191605fd1..e7dd3df8824 100644
--- a/apps/web/src/app/admin-console/organizations/core/views/collection-access-selection.view.ts
+++ b/apps/web/src/app/admin-console/organizations/core/views/collection-access-selection.view.ts
@@ -4,12 +4,14 @@ interface SelectionResponseLike {
id: string;
readOnly: boolean;
hidePasswords: boolean;
+ manage: boolean;
}
export class CollectionAccessSelectionView extends View {
readonly id: string;
readonly readOnly: boolean;
readonly hidePasswords: boolean;
+ readonly manage: boolean;
constructor(response?: SelectionResponseLike) {
super();
@@ -21,5 +23,6 @@ export class CollectionAccessSelectionView extends View {
this.id = response.id;
this.readOnly = response.readOnly;
this.hidePasswords = response.hidePasswords;
+ this.manage = response.manage;
}
}
diff --git a/apps/web/src/app/admin-console/organizations/manage/group-add-edit.component.html b/apps/web/src/app/admin-console/organizations/manage/group-add-edit.component.html
index b6175d80297..66aac8dc4d4 100644
--- a/apps/web/src/app/admin-console/organizations/manage/group-add-edit.component.html
+++ b/apps/web/src/app/admin-console/organizations/manage/group-add-edit.component.html
@@ -40,6 +40,7 @@
[columnHeader]="'member' | i18n"
[selectorLabelText]="'selectMembers' | i18n"
[emptySelectionText]="'noMembersAdded' | i18n"
+ [flexibleCollectionsEnabled]="flexibleCollectionsEnabled$ | async"
>
@@ -60,6 +61,7 @@
[columnHeader]="'collection' | i18n"
[selectorLabelText]="'selectCollections' | i18n"
[emptySelectionText]="'noCollectionsAdded' | i18n"
+ [flexibleCollectionsEnabled]="flexibleCollectionsEnabled$ | async"
>
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 86fc5dcee35..b81ec067110 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
@@ -5,7 +5,9 @@ import { catchError, combineLatest, from, map, of, Subject, switchMap, takeUntil
import { ApiService } from "@bitwarden/common/abstractions/api.service";
import { OrganizationUserService } from "@bitwarden/common/admin-console/abstractions/organization-user/organization-user.service";
+import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum";
import { ErrorResponse } from "@bitwarden/common/models/response/error.response";
+import { ConfigServiceAbstraction } from "@bitwarden/common/platform/abstractions/config/config.service.abstraction";
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
@@ -78,6 +80,11 @@ export const openGroupAddEditDialog = (
templateUrl: "group-add-edit.component.html",
})
export class GroupAddEditComponent implements OnInit, OnDestroy {
+ protected flexibleCollectionsEnabled$ = this.configService.getFeatureFlag$(
+ FeatureFlag.FlexibleCollections,
+ false
+ );
+
protected PermissionMode = PermissionMode;
protected ResultType = GroupAddEditDialogResultType;
@@ -181,7 +188,8 @@ export class GroupAddEditComponent implements OnInit, OnDestroy {
private logService: LogService,
private formBuilder: FormBuilder,
private changeDetectorRef: ChangeDetectorRef,
- private dialogService: DialogService
+ private dialogService: DialogService,
+ private configService: ConfigServiceAbstraction
) {
this.tabIndex = params.initialTab ?? GroupAddEditTabType.Info;
}
diff --git a/apps/web/src/app/admin-console/organizations/members/components/member-dialog/member-dialog.component.html b/apps/web/src/app/admin-console/organizations/members/components/member-dialog/member-dialog.component.html
index 8c506837880..34d407e7b23 100644
--- a/apps/web/src/app/admin-console/organizations/members/components/member-dialog/member-dialog.component.html
+++ b/apps/web/src/app/admin-console/organizations/members/components/member-dialog/member-dialog.component.html
@@ -289,6 +289,7 @@
[columnHeader]="'groups' | i18n"
[selectorLabelText]="'selectGroups' | i18n"
[emptySelectionText]="'noGroupsAdded' | i18n"
+ [flexibleCollectionsEnabled]="flexibleCollectionsEnabled$ | async"
>