From 700acc069b0b8d817533f9b57c90a6c947c5260b Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Mon, 10 Jun 2024 10:24:14 -0400
Subject: [PATCH 01/17] [deps] Autofill: Update tldts to v6.1.25 (#9559)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
---
apps/cli/package.json | 2 +-
package-lock.json | 20 +++++++++++---------
package.json | 2 +-
3 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/apps/cli/package.json b/apps/cli/package.json
index 1ad09cc17a..e992c3b672 100644
--- a/apps/cli/package.json
+++ b/apps/cli/package.json
@@ -80,7 +80,7 @@
"papaparse": "5.4.1",
"proper-lockfile": "4.1.2",
"rxjs": "7.8.1",
- "tldts": "6.1.22",
+ "tldts": "6.1.25",
"zxcvbn": "4.4.2"
}
}
diff --git a/package-lock.json b/package-lock.json
index c5db91b848..fec3db2aea 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -67,7 +67,7 @@
"qrious": "4.0.2",
"rxjs": "7.8.1",
"tabbable": "6.2.0",
- "tldts": "6.1.22",
+ "tldts": "6.1.25",
"utf-8-validate": "6.0.3",
"zone.js": "0.13.3",
"zxcvbn": "4.4.2"
@@ -228,7 +228,7 @@
"papaparse": "5.4.1",
"proper-lockfile": "4.1.2",
"rxjs": "7.8.1",
- "tldts": "6.1.22",
+ "tldts": "6.1.25",
"zxcvbn": "4.4.2"
},
"bin": {
@@ -37431,20 +37431,22 @@
"dev": true
},
"node_modules/tldts": {
- "version": "6.1.22",
- "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.22.tgz",
- "integrity": "sha512-WwWAPp+zJn8oJkpjqJcSuuj5foL9cI8SiTjH+gGS1bw5N163YywM0Cmd9OijwtKjdGG7OC6NEYZVl4EG8HfSMg==",
+ "version": "6.1.25",
+ "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.25.tgz",
+ "integrity": "sha512-UmjB1dVArio9hny1D84VFeEvE37nCyfW5sWHr7AUV2MxJgxD8NR/kdmEMyjx5o/kRuOOBbaaXStce2R5C6I1Gg==",
+ "license": "MIT",
"dependencies": {
- "tldts-core": "^6.1.22"
+ "tldts-core": "^6.1.25"
},
"bin": {
"tldts": "bin/cli.js"
}
},
"node_modules/tldts-core": {
- "version": "6.1.22",
- "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.22.tgz",
- "integrity": "sha512-TMCyBC7HpvDpBRQCLsODmsclNXGhZLSj76gIlx7QcwvKElMdIzhGN5iYcuTI7yAWJm8zTpsVehWCeOGytDY9fg=="
+ "version": "6.1.25",
+ "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.25.tgz",
+ "integrity": "sha512-hbSsjJOeDMV91JiqcrrFQ46D7EepH880zVmPjnBDmt3P+h0Aowz8Nh1adIcqkdhJbgpzZYQr6aM8/N3tZC6JyA==",
+ "license": "MIT"
},
"node_modules/tmp": {
"version": "0.0.33",
diff --git a/package.json b/package.json
index 9670da6f67..93a6b51280 100644
--- a/package.json
+++ b/package.json
@@ -204,7 +204,7 @@
"qrious": "4.0.2",
"rxjs": "7.8.1",
"tabbable": "6.2.0",
- "tldts": "6.1.22",
+ "tldts": "6.1.25",
"utf-8-validate": "6.0.3",
"zone.js": "0.13.3",
"zxcvbn": "4.4.2"
From 7fb94082024f15ad5cd1c52be633663f3f1924ee Mon Sep 17 00:00:00 2001
From: Dillon Beresford <165616268+bwdil@users.noreply.github.com>
Date: Mon, 10 Jun 2024 10:54:24 -0500
Subject: [PATCH 02/17] [PM-7025] include check-run in workflows where secrets
are used (#9135)
* include check-run in workflows where secrets are used
* revert changes in build-cli workflow and add check-run to codecov
* assert token permissions
---------
Co-authored-by: Matt Bishop
---
.github/workflows/test.yml | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 12649b91ea..cb4a18947b 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -8,16 +8,26 @@ on:
- "main"
- "rc"
- "hotfix-rc-*"
- pull_request:
+ pull_request_target:
+ types: [opened, synchronize]
defaults:
run:
shell: bash
jobs:
+ check-run:
+ name: Check PR run
+ uses: bitwarden/gh-actions/.github/workflows/check-run.yml@main
+
test:
name: Run tests
runs-on: ubuntu-22.04
+ needs: check-run
+ permissions:
+ contents: read
+ pull-requests: write
+
steps:
- name: Checkout repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
From 19f2d2aefc3cd411511638f6c80c4695580b030e Mon Sep 17 00:00:00 2001
From: Shane Melton
Date: Mon, 10 Jun 2024 09:55:12 -0700
Subject: [PATCH 03/17] [PM-8379] Update vault popup items service to track
loading state (#9528)
---
.../vault-popup-items.service.spec.ts | 48 +++++++++++++++++++
.../services/vault-popup-items.service.ts | 35 ++++++++++----
libs/common/spec/observable-tracker.ts | 9 ++--
3 files changed, 78 insertions(+), 14 deletions(-)
diff --git a/apps/browser/src/vault/popup/services/vault-popup-items.service.spec.ts b/apps/browser/src/vault/popup/services/vault-popup-items.service.spec.ts
index b7091eb87b..f08f4e836e 100644
--- a/apps/browser/src/vault/popup/services/vault-popup-items.service.spec.ts
+++ b/apps/browser/src/vault/popup/services/vault-popup-items.service.spec.ts
@@ -379,6 +379,54 @@ describe("VaultPopupItemsService", () => {
});
});
+ describe("loading$", () => {
+ let tracked: ObservableTracker;
+ let trackedCiphers: ObservableTracker;
+ beforeEach(() => {
+ // Start tracking loading$ emissions
+ tracked = new ObservableTracker(service.loading$);
+
+ // Track remainingCiphers$ to make cipher observables active
+ trackedCiphers = new ObservableTracker(service.remainingCiphers$);
+ });
+
+ it("should initialize with true first", async () => {
+ expect(tracked.emissions[0]).toBe(true);
+ });
+
+ it("should emit false once ciphers are available", async () => {
+ expect(tracked.emissions.length).toBe(2);
+ expect(tracked.emissions[0]).toBe(true);
+ expect(tracked.emissions[1]).toBe(false);
+ });
+
+ it("should cycle when cipherService.ciphers$ emits", async () => {
+ // Restart tracking
+ tracked = new ObservableTracker(service.loading$);
+ (cipherServiceMock.ciphers$ as BehaviorSubject).next(null);
+
+ await trackedCiphers.pauseUntilReceived(2);
+
+ expect(tracked.emissions.length).toBe(3);
+ expect(tracked.emissions[0]).toBe(false);
+ expect(tracked.emissions[1]).toBe(true);
+ expect(tracked.emissions[2]).toBe(false);
+ });
+
+ it("should cycle when filters are applied", async () => {
+ // Restart tracking
+ tracked = new ObservableTracker(service.loading$);
+ service.applyFilter("test");
+
+ await trackedCiphers.pauseUntilReceived(2);
+
+ expect(tracked.emissions.length).toBe(3);
+ expect(tracked.emissions[0]).toBe(false);
+ expect(tracked.emissions[1]).toBe(true);
+ expect(tracked.emissions[2]).toBe(false);
+ });
+ });
+
describe("applyFilter", () => {
it("should call search Service with the new search term", (done) => {
const searchText = "Hello";
diff --git a/apps/browser/src/vault/popup/services/vault-popup-items.service.ts b/apps/browser/src/vault/popup/services/vault-popup-items.service.ts
index 189ce2c09f..f96bb095b9 100644
--- a/apps/browser/src/vault/popup/services/vault-popup-items.service.ts
+++ b/apps/browser/src/vault/popup/services/vault-popup-items.service.ts
@@ -2,6 +2,7 @@ import { inject, Injectable, NgZone } from "@angular/core";
import {
BehaviorSubject,
combineLatest,
+ distinctUntilChanged,
distinctUntilKeyChanged,
from,
map,
@@ -12,6 +13,8 @@ import {
startWith,
Subject,
switchMap,
+ tap,
+ withLatestFrom,
} from "rxjs";
import { SearchService } from "@bitwarden/common/abstractions/search.service";
@@ -40,6 +43,13 @@ import { MY_VAULT_ID, VaultPopupListFiltersService } from "./vault-popup-list-fi
export class VaultPopupItemsService {
private _refreshCurrentTab$ = new Subject();
private _searchText$ = new BehaviorSubject("");
+
+ /**
+ * Subject that emits whenever new ciphers are being processed/filtered.
+ * @private
+ */
+ private _ciphersLoading$ = new Subject();
+
latestSearchText$: Observable = this._searchText$.asObservable();
/**
@@ -84,6 +94,7 @@ export class VaultPopupItemsService {
this.cipherService.localData$,
).pipe(
runInsideAngular(inject(NgZone)), // Workaround to ensure cipher$ state provider emissions are run inside Angular
+ tap(() => this._ciphersLoading$.next()),
switchMap(() => Utils.asyncToObservable(() => this.cipherService.getAllDecrypted())),
switchMap((ciphers) =>
combineLatest([
@@ -112,6 +123,7 @@ export class VaultPopupItemsService {
this._searchText$,
this.vaultPopupListFiltersService.filterFunction$,
]).pipe(
+ tap(() => this._ciphersLoading$.next()),
map(([ciphers, searchText, filterFunction]): [CipherView[], string] => [
filterFunction(ciphers),
searchText,
@@ -148,10 +160,8 @@ export class VaultPopupItemsService {
* List of favorite ciphers that are not currently suggested for autofill.
* Ciphers are sorted by last used date, then by name.
*/
- favoriteCiphers$: Observable = combineLatest([
- this.autoFillCiphers$,
- this._filteredCipherList$,
- ]).pipe(
+ favoriteCiphers$: Observable = this.autoFillCiphers$.pipe(
+ withLatestFrom(this._filteredCipherList$),
map(([autoFillCiphers, ciphers]) =>
ciphers.filter((cipher) => cipher.favorite && !autoFillCiphers.includes(cipher)),
),
@@ -165,12 +175,9 @@ export class VaultPopupItemsService {
* List of all remaining ciphers that are not currently suggested for autofill or marked as favorite.
* Ciphers are sorted by name.
*/
- remainingCiphers$: Observable = combineLatest([
- this.autoFillCiphers$,
- this.favoriteCiphers$,
- this._filteredCipherList$,
- ]).pipe(
- map(([autoFillCiphers, favoriteCiphers, ciphers]) =>
+ remainingCiphers$: Observable = this.favoriteCiphers$.pipe(
+ withLatestFrom(this._filteredCipherList$, this.autoFillCiphers$),
+ map(([favoriteCiphers, ciphers, autoFillCiphers]) =>
ciphers.filter(
(cipher) => !autoFillCiphers.includes(cipher) && !favoriteCiphers.includes(cipher),
),
@@ -179,6 +186,14 @@ export class VaultPopupItemsService {
shareReplay({ refCount: false, bufferSize: 1 }),
);
+ /**
+ * Observable that indicates whether the service is currently loading ciphers.
+ */
+ loading$: Observable = merge(
+ this._ciphersLoading$.pipe(map(() => true)),
+ this.remainingCiphers$.pipe(map(() => false)),
+ ).pipe(startWith(true), distinctUntilChanged(), shareReplay({ refCount: false, bufferSize: 1 }));
+
/**
* Observable that indicates whether a filter is currently applied to the ciphers.
*/
diff --git a/libs/common/spec/observable-tracker.ts b/libs/common/spec/observable-tracker.ts
index 9bf0475bee..dfb4983593 100644
--- a/libs/common/spec/observable-tracker.ts
+++ b/libs/common/spec/observable-tracker.ts
@@ -1,4 +1,4 @@
-import { Observable, Subject, Subscription, firstValueFrom, throwError, timeout } from "rxjs";
+import { firstValueFrom, Observable, Subject, Subscription, throwError, timeout } from "rxjs";
/** Test class to enable async awaiting of observable emissions */
export class ObservableTracker {
@@ -43,6 +43,9 @@ export class ObservableTracker {
private trackEmissions(observable: Observable): T[] {
const emissions: T[] = [];
+ this.emissionReceived.subscribe((value) => {
+ emissions.push(value);
+ });
this.subscription = observable.subscribe((value) => {
if (value == null) {
this.emissionReceived.next(null);
@@ -64,9 +67,7 @@ export class ObservableTracker {
}
}
});
- this.emissionReceived.subscribe((value) => {
- emissions.push(value);
- });
+
return emissions;
}
}
From b169207b74ee593365a82b1b73c6d0241a21928e Mon Sep 17 00:00:00 2001
From: Vincent Salucci <26154748+vincentsalucci@users.noreply.github.com>
Date: Mon, 10 Jun 2024 11:59:20 -0500
Subject: [PATCH 04/17] [AC-2647] Remove Flexible Collections MVP code (#9518)
* chore: organization.ts, remove refs to flexibleCollections and isManager, refs AC-2647
* chore: clean up callers of removed methods from organization.ts, refs AC-2647
* chore: access-selector, remove fc input and update permissionList param, refs AC-2647
* chore: update permissionList caller, update group-add-edit fc refs, and remove accessAll, refs AC-2647
* chore: update member-dialog fc callers, refs AC-2647
* chore: update bulk-collections-dialog fc callers, refs AC-2647
* chore: update collection-dialog fc callers, refs AC-2647
* chore: update simple fc caller to misc files, refs AC-2647
* chore: update member-dialog fc callers, refs AC-2647
* chore: remove accessAll references and update callers, refs AC-2647
* chore: update comment to specify v1 usage, refs AC-2647
* chore: remove unused message keys and code calls to use those messages, refs AC-2647
* chore: remove readonly false from access-selector model map function, refs AC-2647
---
.../core/services/group/group.service.ts | 1 -
.../services/group/requests/group.request.ts | 1 -
.../group/responses/group.response.ts | 6 -
.../core/services/user-admin.service.ts | 3 -
.../organizations/core/views/group.view.ts | 6 -
.../views/organization-user-admin-view.ts | 6 -
.../core/views/organization-user.view.ts | 6 -
.../organization-layout.component.html | 2 +-
.../manage/group-add-edit.component.html | 27 +--
.../manage/group-add-edit.component.ts | 13 +-
.../manage/groups.component.html | 2 -
.../member-dialog.component.html | 217 +++++-------------
.../member-dialog/member-dialog.component.ts | 26 +--
.../members/people.component.html | 2 -
.../settings/account.component.html | 2 +-
.../access-selector.component.html | 9 -
.../access-selector.component.ts | 20 +-
.../access-selector/access-selector.models.ts | 16 +-
.../access-selector.stories.ts | 3 -
.../access-selector/user-type.pipe.ts | 2 -
.../collection-dialog.component.html | 4 +-
.../collection-dialog.component.ts | 14 +-
.../vault-collection-row.component.ts | 2 +-
.../vault-filter-section.component.ts | 14 +-
.../bulk-collections-dialog.component.html | 2 -
.../bulk-collections-dialog.component.ts | 6 +-
.../vault-filter/vault-filter.component.ts | 6 +-
.../vault-header/vault-header.component.html | 5 +-
.../vault-header/vault-header.component.ts | 4 +-
.../app/vault/org-vault/vault.component.html | 4 +-
.../app/vault/org-vault/vault.component.ts | 2 +-
apps/web/src/locales/en/messages.json | 27 ---
libs/angular/src/pipes/user-type.pipe.ts | 2 -
.../organization-user-invite.request.ts | 1 -
.../organization-user-update.request.ts | 1 -
.../responses/organization-user.response.ts | 6 -
.../organization.service.abstraction.ts | 7 +-
.../models/domain/organization.ts | 55 +----
.../src/vault/models/view/collection.view.ts | 14 +-
.../src/components/import.component.ts | 7 +-
.../src/components/export.component.ts | 6 +-
41 files changed, 106 insertions(+), 453 deletions(-)
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 63431cd6ab..e06a9aa8dc 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
@@ -80,7 +80,6 @@ export class InternalGroupService extends GroupService {
async save(group: GroupView): Promise {
const request = new GroupRequest();
request.name = group.name;
- request.accessAll = group.accessAll;
request.users = group.members;
request.collections = group.collections.map(
(c) => new SelectionReadOnlyRequest(c.id, c.readOnly, c.hidePasswords, c.manage),
diff --git a/apps/web/src/app/admin-console/organizations/core/services/group/requests/group.request.ts b/apps/web/src/app/admin-console/organizations/core/services/group/requests/group.request.ts
index b59c869692..40f253d945 100644
--- a/apps/web/src/app/admin-console/organizations/core/services/group/requests/group.request.ts
+++ b/apps/web/src/app/admin-console/organizations/core/services/group/requests/group.request.ts
@@ -2,7 +2,6 @@ import { SelectionReadOnlyRequest } from "@bitwarden/common/admin-console/models
export class GroupRequest {
name: string;
- accessAll: boolean;
collections: SelectionReadOnlyRequest[] = [];
users: string[] = [];
}
diff --git a/apps/web/src/app/admin-console/organizations/core/services/group/responses/group.response.ts b/apps/web/src/app/admin-console/organizations/core/services/group/responses/group.response.ts
index e969de4ad1..eb62d83712 100644
--- a/apps/web/src/app/admin-console/organizations/core/services/group/responses/group.response.ts
+++ b/apps/web/src/app/admin-console/organizations/core/services/group/responses/group.response.ts
@@ -5,11 +5,6 @@ export class GroupResponse extends BaseResponse {
id: string;
organizationId: string;
name: string;
- /**
- * @deprecated
- * To be removed after Flexible Collections.
- **/
- accessAll: boolean;
externalId: string;
constructor(response: any) {
@@ -17,7 +12,6 @@ export class GroupResponse extends BaseResponse {
this.id = this.getResponseProperty("Id");
this.organizationId = this.getResponseProperty("OrganizationId");
this.name = this.getResponseProperty("Name");
- this.accessAll = this.getResponseProperty("AccessAll");
this.externalId = this.getResponseProperty("ExternalId");
}
}
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 399140e3ea..52a522c89d 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
@@ -41,7 +41,6 @@ export class UserAdminService {
async save(user: OrganizationUserAdminView): Promise {
const request = new OrganizationUserUpdateRequest();
- request.accessAll = user.accessAll;
request.permissions = user.permissions;
request.type = user.type;
request.collections = user.collections;
@@ -54,7 +53,6 @@ export class UserAdminService {
async invite(emails: string[], user: OrganizationUserAdminView): Promise {
const request = new OrganizationUserInviteRequest();
request.emails = emails;
- request.accessAll = user.accessAll;
request.permissions = user.permissions;
request.type = user.type;
request.collections = user.collections;
@@ -77,7 +75,6 @@ export class UserAdminService {
view.type = u.type;
view.status = u.status;
view.externalId = u.externalId;
- view.accessAll = u.accessAll;
view.permissions = u.permissions;
view.resetPasswordEnrolled = u.resetPasswordEnrolled;
view.collections = u.collections.map((c) => ({
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 25864cca34..1909b9a863 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
@@ -8,12 +8,6 @@ export class GroupView implements View {
id: string;
organizationId: string;
name: string;
- /**
- * @deprecated
- * To be removed after Flexible Collections.
- * This will always return `false` if Flexible Collections is enabled.
- **/
- accessAll: boolean;
externalId: string;
collections: CollectionAccessSelectionView[] = [];
members: string[] = [];
diff --git a/apps/web/src/app/admin-console/organizations/core/views/organization-user-admin-view.ts b/apps/web/src/app/admin-console/organizations/core/views/organization-user-admin-view.ts
index b4241826b3..97e77d8543 100644
--- a/apps/web/src/app/admin-console/organizations/core/views/organization-user-admin-view.ts
+++ b/apps/web/src/app/admin-console/organizations/core/views/organization-user-admin-view.ts
@@ -13,12 +13,6 @@ export class OrganizationUserAdminView {
type: OrganizationUserType;
status: OrganizationUserStatusType;
externalId: string;
- /**
- * @deprecated
- * To be removed after Flexible Collections.
- * This will always return `false` if Flexible Collections is enabled.
- **/
- accessAll: boolean;
permissions: PermissionsApi;
resetPasswordEnrolled: boolean;
hasMasterPassword: boolean;
diff --git a/apps/web/src/app/admin-console/organizations/core/views/organization-user.view.ts b/apps/web/src/app/admin-console/organizations/core/views/organization-user.view.ts
index 947ae9b13e..86d1f4ded6 100644
--- a/apps/web/src/app/admin-console/organizations/core/views/organization-user.view.ts
+++ b/apps/web/src/app/admin-console/organizations/core/views/organization-user.view.ts
@@ -12,12 +12,6 @@ export class OrganizationUserView {
userId: string;
type: OrganizationUserType;
status: OrganizationUserStatusType;
- /**
- * @deprecated
- * To be removed after Flexible Collections.
- * This will always return `false` if Flexible Collections is enabled.
- **/
- accessAll: boolean;
permissions: PermissionsApi;
resetPasswordEnrolled: boolean;
name: string;
diff --git a/apps/web/src/app/admin-console/organizations/layouts/organization-layout.component.html b/apps/web/src/app/admin-console/organizations/layouts/organization-layout.component.html
index 237e2c6e30..445a0855c1 100644
--- a/apps/web/src/app/admin-console/organizations/layouts/organization-layout.component.html
+++ b/apps/web/src/app/admin-console/organizations/layouts/organization-layout.component.html
@@ -11,7 +11,7 @@
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 166467ada0..eaf10405db 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
@@ -45,7 +45,6 @@
[columnHeader]="'member' | i18n"
[selectorLabelText]="'selectMembers' | i18n"
[emptySelectionText]="'noMembersAdded' | i18n"
- [flexibleCollectionsEnabled]="flexibleCollectionsEnabled$ | async"
>
@@ -56,24 +55,14 @@
{{ "restrictedCollectionAssignmentDesc" | i18n }}
-
-
-
-
{{ "accessAllCollectionsHelp" | i18n }}
-
-
-
-
+
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 38ef002534..8df770686f 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
@@ -96,9 +96,6 @@ export class GroupAddEditComponent implements OnInit, OnDestroy {
private organization$ = this.organizationService
.get$(this.organizationId)
.pipe(shareReplay({ refCount: true }));
- protected flexibleCollectionsEnabled$ = this.organization$.pipe(
- map((o) => o?.flexibleCollections),
- );
private flexibleCollectionsV1Enabled$ = this.configService.getFeatureFlag$(
FeatureFlag.FlexibleCollectionsV1,
);
@@ -114,7 +111,6 @@ export class GroupAddEditComponent implements OnInit, OnDestroy {
group: GroupView;
groupForm = this.formBuilder.group({
- accessAll: [false],
name: ["", [Validators.required, Validators.maxLength(100)]],
externalId: this.formBuilder.control({ value: "", disabled: true }),
members: [[] as AccessItemValue[]],
@@ -188,7 +184,7 @@ export class GroupAddEditComponent implements OnInit, OnDestroy {
this.flexibleCollectionsV1Enabled$,
]).pipe(
map(([organization, flexibleCollectionsV1Enabled]) => {
- if (!flexibleCollectionsV1Enabled || !organization.flexibleCollections) {
+ if (!flexibleCollectionsV1Enabled) {
return true;
}
@@ -276,7 +272,6 @@ export class GroupAddEditComponent implements OnInit, OnDestroy {
this.groupForm.patchValue({
name: this.group.name,
externalId: this.group.externalId,
- accessAll: this.group.accessAll,
members: this.group.members.map((m) => ({
id: m,
type: AccessItemType.Member,
@@ -328,12 +323,8 @@ export class GroupAddEditComponent implements OnInit, OnDestroy {
const formValue = this.groupForm.value;
groupView.name = formValue.name;
- groupView.accessAll = formValue.accessAll;
groupView.members = formValue.members?.map((m) => m.id) ?? [];
-
- if (!groupView.accessAll) {
- groupView.collections = formValue.collections.map((c) => convertToSelectionView(c));
- }
+ groupView.collections = formValue.collections.map((c) => convertToSelectionView(c));
await this.groupService.save(groupView);
diff --git a/apps/web/src/app/admin-console/organizations/manage/groups.component.html b/apps/web/src/app/admin-console/organizations/manage/groups.component.html
index f256c29b05..1a1a7cdb90 100644
--- a/apps/web/src/app/admin-console/organizations/manage/groups.component.html
+++ b/apps/web/src/app/admin-console/organizations/manage/groups.component.html
@@ -74,12 +74,10 @@
- {{ "all" | i18n }}
|
|
|