From 2f1f9cd333bda0d5d77764dabba71b9aa06a6dae Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Mon, 4 Nov 2024 09:30:03 -0500
Subject: [PATCH 01/10] [deps] Platform: Update @types/chrome to v0.0.280
(#11314)
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 a3efe3d2224..0b4ea535e8a 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -97,7 +97,7 @@
"@storybook/manager-api": "8.2.9",
"@storybook/theming": "8.2.9",
"@types/argon2-browser": "1.18.4",
- "@types/chrome": "0.0.272",
+ "@types/chrome": "0.0.280",
"@types/firefox-webext-browser": "120.0.4",
"@types/inquirer": "8.2.10",
"@types/jest": "29.5.12",
@@ -9110,9 +9110,9 @@
}
},
"node_modules/@types/chrome": {
- "version": "0.0.272",
- "resolved": "https://registry.npmjs.org/@types/chrome/-/chrome-0.0.272.tgz",
- "integrity": "sha512-9cxDmmgyhXV8gsZvlRjqaDizNjIjbV0spsR0fIEaQUoHtbl9D8VkTOLyONgiBKK+guR38x5eMO3E3avUYOXwcQ==",
+ "version": "0.0.280",
+ "resolved": "https://registry.npmjs.org/@types/chrome/-/chrome-0.0.280.tgz",
+ "integrity": "sha512-AotSmZrL9bcZDDmSI1D9dE7PGbhOur5L0cKxXd7IqbVizQWCY4gcvupPUVsQ4FfDj3V2tt/iOpomT9EY0s+w1g==",
"dev": true,
"license": "MIT",
"dependencies": {
diff --git a/package.json b/package.json
index ba94a3ca45f..ef48d31c0a7 100644
--- a/package.json
+++ b/package.json
@@ -58,7 +58,7 @@
"@storybook/manager-api": "8.2.9",
"@storybook/theming": "8.2.9",
"@types/argon2-browser": "1.18.4",
- "@types/chrome": "0.0.272",
+ "@types/chrome": "0.0.280",
"@types/firefox-webext-browser": "120.0.4",
"@types/inquirer": "8.2.10",
"@types/jest": "29.5.12",
From f43bf482154e0ba4ef6e0d444f6bb79366056bc2 Mon Sep 17 00:00:00 2001
From: Daniel Riera
Date: Mon, 4 Nov 2024 08:40:00 -0600
Subject: [PATCH 02/10] [PM-11777] fix: TOTP not copied when autofilling
passkey (#11814)
* PM-11777 fix: TOTP not copied when autofilling passkey
- Added totpService to overlay background constructor
- Edited spec to account for totpsService
- Edited fillInlineMenuCipher to copy totp to clipboard if present
* add optional chaining
---
.../src/autofill/background/overlay.background.spec.ts | 4 ++++
.../browser/src/autofill/background/overlay.background.ts | 8 +++++++-
apps/browser/src/background/main.background.ts | 1 +
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/apps/browser/src/autofill/background/overlay.background.spec.ts b/apps/browser/src/autofill/background/overlay.background.spec.ts
index 29ae35d5cef..6ec3c0a9b5a 100644
--- a/apps/browser/src/autofill/background/overlay.background.spec.ts
+++ b/apps/browser/src/autofill/background/overlay.background.spec.ts
@@ -32,6 +32,7 @@ import {
} from "@bitwarden/common/spec";
import { UserId } from "@bitwarden/common/types/guid";
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
+import { TotpService } from "@bitwarden/common/vault/abstractions/totp.service";
import { VaultSettingsService } from "@bitwarden/common/vault/abstractions/vault-settings/vault-settings.service";
import { CipherRepromptType, CipherType } from "@bitwarden/common/vault/enums";
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
@@ -106,6 +107,7 @@ describe("OverlayBackground", () => {
let selectedThemeMock$: BehaviorSubject;
let inlineMenuFieldQualificationService: InlineMenuFieldQualificationService;
let themeStateService: MockProxy;
+ let totpService: MockProxy;
let overlayBackground: OverlayBackground;
let portKeyForTabSpy: Record;
let pageDetailsForTabSpy: PageDetailsForTab;
@@ -184,6 +186,7 @@ describe("OverlayBackground", () => {
inlineMenuFieldQualificationService = new InlineMenuFieldQualificationService();
themeStateService = mock();
themeStateService.selectedTheme$ = selectedThemeMock$;
+ totpService = mock();
overlayBackground = new OverlayBackground(
logService,
cipherService,
@@ -198,6 +201,7 @@ describe("OverlayBackground", () => {
fido2ActiveRequestManager,
inlineMenuFieldQualificationService,
themeStateService,
+ totpService,
generatedPasswordCallbackMock,
addPasswordCallbackMock,
);
diff --git a/apps/browser/src/autofill/background/overlay.background.ts b/apps/browser/src/autofill/background/overlay.background.ts
index a2b3e33d74f..c42d1f7e640 100644
--- a/apps/browser/src/autofill/background/overlay.background.ts
+++ b/apps/browser/src/autofill/background/overlay.background.ts
@@ -33,6 +33,7 @@ import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/pl
import { Utils } from "@bitwarden/common/platform/misc/utils";
import { ThemeStateService } from "@bitwarden/common/platform/theming/theme-state.service";
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
+import { TotpService } from "@bitwarden/common/vault/abstractions/totp.service";
import { VaultSettingsService } from "@bitwarden/common/vault/abstractions/vault-settings/vault-settings.service";
import { CipherType } from "@bitwarden/common/vault/enums";
import { buildCipherIcon } from "@bitwarden/common/vault/icon/build-cipher-icon";
@@ -217,6 +218,7 @@ export class OverlayBackground implements OverlayBackgroundInterface {
private fido2ActiveRequestManager: Fido2ActiveRequestManager,
private inlineMenuFieldQualificationService: InlineMenuFieldQualificationService,
private themeStateService: ThemeStateService,
+ private totpService: TotpService,
private generatePasswordCallback: () => Promise,
private addPasswordCallback: (password: string) => Promise,
) {
@@ -1058,7 +1060,6 @@ export class OverlayBackground implements OverlayBackgroundInterface {
}
const cipher = this.inlineMenuCiphers.get(inlineMenuCipherId);
-
if (usePasskey && cipher.login?.hasFido2Credentials) {
await this.authenticatePasskeyCredential(
sender,
@@ -1066,6 +1067,11 @@ export class OverlayBackground implements OverlayBackgroundInterface {
);
this.updateLastUsedInlineMenuCipher(inlineMenuCipherId, cipher);
+ if (cipher.login?.totp) {
+ this.platformUtilsService.copyToClipboard(
+ await this.totpService.getCode(cipher.login.totp),
+ );
+ }
return;
}
diff --git a/apps/browser/src/background/main.background.ts b/apps/browser/src/background/main.background.ts
index c3ecb5d3fe7..27d83af1321 100644
--- a/apps/browser/src/background/main.background.ts
+++ b/apps/browser/src/background/main.background.ts
@@ -1678,6 +1678,7 @@ export default class MainBackground {
this.fido2ActiveRequestManager,
inlineMenuFieldQualificationService,
this.themeStateService,
+ this.totpService,
() => this.generatePassword(),
(password) => this.addPasswordToHistory(password),
);
From 62545aa25aa31305f9b5ab5030134f17c18cb4cb Mon Sep 17 00:00:00 2001
From: Brandon Treston
Date: Mon, 4 Nov 2024 09:46:11 -0500
Subject: [PATCH 03/10] =?UTF-8?q?Revert=20"[PM-13645]=20Fix=20invite=20cou?=
=?UTF-8?q?nter=20to=20check=20remaining=20number=20of=20seats=20in=20p?=
=?UTF-8?q?=E2=80=A6"=20(#11843)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This reverts commit 2a956744bdb8057fb33c2b8fae6db277e0bc18a7.
---
.../member-dialog/member-dialog.component.html | 11 +++++------
.../member-dialog/member-dialog.component.ts | 5 -----
apps/web/src/locales/en/messages.json | 3 ---
3 files changed, 5 insertions(+), 14 deletions(-)
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 a8ecf255f33..2c5daf93c6f 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
@@ -23,15 +23,14 @@
{{ "inviteUserDesc" | i18n }}
-
+
{{ "email" | i18n }}
- 1; else singleSeat">{{
- "inviteMultipleEmailDesc" | i18n: remainingSeats
+ {{
+ "inviteMultipleEmailDesc"
+ | i18n
+ : (organization.productTierType === ProductTierType.TeamsStarter ? "10" : "20")
}}
-
- {{ "inviteSingleEmailDesc" | i18n: remainingSeats }}
-
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 4a95c9cb9cb..8df40e35fef 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
@@ -89,7 +89,6 @@ export class MemberDialogComponent implements OnDestroy {
PermissionMode = PermissionMode;
showNoMasterPasswordWarning = false;
isOnSecretsManagerStandalone: boolean;
- remainingSeats$: Observable;
protected organization$: Observable;
protected collectionAccessItems: AccessItemView[] = [];
@@ -251,10 +250,6 @@ export class MemberDialogComponent implements OnDestroy {
this.loading = false;
});
-
- this.remainingSeats$ = this.organization$.pipe(
- map((organization) => organization.seats - this.params.numConfirmedMembers),
- );
}
private setFormValidators(organization: Organization) {
diff --git a/apps/web/src/locales/en/messages.json b/apps/web/src/locales/en/messages.json
index 619d2407be2..986648e5c16 100644
--- a/apps/web/src/locales/en/messages.json
+++ b/apps/web/src/locales/en/messages.json
@@ -3218,9 +3218,6 @@
}
}
},
- "inviteSingleEmailDesc": {
- "message": "You have 1 invite remaining."
- },
"userUsingTwoStep": {
"message": "This user is using two-step login to protect their account."
},
From 2d0460eb15130e8750ef2e51befb5ed647a7f8fe Mon Sep 17 00:00:00 2001
From: "bw-ghapp[bot]" <178206702+bw-ghapp[bot]@users.noreply.github.com>
Date: Mon, 4 Nov 2024 15:43:54 +0000
Subject: [PATCH 04/10] Bumped client version(s) (#11850)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
---
apps/browser/package.json | 2 +-
apps/browser/src/manifest.json | 2 +-
apps/browser/src/manifest.v3.json | 2 +-
apps/cli/package.json | 2 +-
apps/desktop/package.json | 2 +-
apps/desktop/src/package-lock.json | 4 ++--
apps/desktop/src/package.json | 2 +-
apps/web/package.json | 2 +-
package-lock.json | 8 ++++----
9 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/apps/browser/package.json b/apps/browser/package.json
index 6c41f6267cc..5909c802b36 100644
--- a/apps/browser/package.json
+++ b/apps/browser/package.json
@@ -1,6 +1,6 @@
{
"name": "@bitwarden/browser",
- "version": "2024.10.1",
+ "version": "2024.11.0",
"scripts": {
"build": "cross-env MANIFEST_VERSION=3 webpack",
"build:mv2": "webpack",
diff --git a/apps/browser/src/manifest.json b/apps/browser/src/manifest.json
index 850c5c4727a..0d9a4189578 100644
--- a/apps/browser/src/manifest.json
+++ b/apps/browser/src/manifest.json
@@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "__MSG_extName__",
"short_name": "__MSG_appName__",
- "version": "2024.10.1",
+ "version": "2024.11.0",
"description": "__MSG_extDesc__",
"default_locale": "en",
"author": "Bitwarden Inc.",
diff --git a/apps/browser/src/manifest.v3.json b/apps/browser/src/manifest.v3.json
index 0b89a36d700..f805b701551 100644
--- a/apps/browser/src/manifest.v3.json
+++ b/apps/browser/src/manifest.v3.json
@@ -3,7 +3,7 @@
"minimum_chrome_version": "102.0",
"name": "__MSG_extName__",
"short_name": "__MSG_appName__",
- "version": "2024.10.1",
+ "version": "2024.11.0",
"description": "__MSG_extDesc__",
"default_locale": "en",
"author": "Bitwarden Inc.",
diff --git a/apps/cli/package.json b/apps/cli/package.json
index 6aa48d5d4a5..dcba6707fdf 100644
--- a/apps/cli/package.json
+++ b/apps/cli/package.json
@@ -1,7 +1,7 @@
{
"name": "@bitwarden/cli",
"description": "A secure and free password manager for all of your devices.",
- "version": "2024.10.0",
+ "version": "2024.11.0",
"keywords": [
"bitwarden",
"password",
diff --git a/apps/desktop/package.json b/apps/desktop/package.json
index 8c89da0e85f..c9e33b7110a 100644
--- a/apps/desktop/package.json
+++ b/apps/desktop/package.json
@@ -1,7 +1,7 @@
{
"name": "@bitwarden/desktop",
"description": "A secure and free password manager for all of your devices.",
- "version": "2024.10.3",
+ "version": "2024.11.0",
"keywords": [
"bitwarden",
"password",
diff --git a/apps/desktop/src/package-lock.json b/apps/desktop/src/package-lock.json
index 669467d3569..21075252981 100644
--- a/apps/desktop/src/package-lock.json
+++ b/apps/desktop/src/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "@bitwarden/desktop",
- "version": "2024.10.3",
+ "version": "2024.11.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@bitwarden/desktop",
- "version": "2024.10.3",
+ "version": "2024.11.0",
"license": "GPL-3.0",
"dependencies": {
"@bitwarden/desktop-napi": "file:../desktop_native/napi",
diff --git a/apps/desktop/src/package.json b/apps/desktop/src/package.json
index bc711455185..3f4bb0fc0cf 100644
--- a/apps/desktop/src/package.json
+++ b/apps/desktop/src/package.json
@@ -2,7 +2,7 @@
"name": "@bitwarden/desktop",
"productName": "Bitwarden",
"description": "A secure and free password manager for all of your devices.",
- "version": "2024.10.3",
+ "version": "2024.11.0",
"author": "Bitwarden Inc. (https://bitwarden.com)",
"homepage": "https://bitwarden.com",
"license": "GPL-3.0",
diff --git a/apps/web/package.json b/apps/web/package.json
index 21274fbd804..5dd0e442f2d 100644
--- a/apps/web/package.json
+++ b/apps/web/package.json
@@ -1,6 +1,6 @@
{
"name": "@bitwarden/web-vault",
- "version": "2024.10.5",
+ "version": "2024.11.0",
"scripts": {
"build:oss": "webpack",
"build:bit": "webpack -c ../../bitwarden_license/bit-web/webpack.config.js",
diff --git a/package-lock.json b/package-lock.json
index 0b4ea535e8a..8ba595c53dc 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -193,11 +193,11 @@
},
"apps/browser": {
"name": "@bitwarden/browser",
- "version": "2024.10.1"
+ "version": "2024.11.0"
},
"apps/cli": {
"name": "@bitwarden/cli",
- "version": "2024.10.0",
+ "version": "2024.11.0",
"license": "SEE LICENSE IN LICENSE.txt",
"dependencies": {
"@koa/multer": "3.0.2",
@@ -233,7 +233,7 @@
},
"apps/desktop": {
"name": "@bitwarden/desktop",
- "version": "2024.10.3",
+ "version": "2024.11.0",
"hasInstallScript": true,
"license": "GPL-3.0"
},
@@ -247,7 +247,7 @@
},
"apps/web": {
"name": "@bitwarden/web-vault",
- "version": "2024.10.5"
+ "version": "2024.11.0"
},
"libs/admin-console": {
"name": "@bitwarden/admin-console",
From d669d2003fd646060c3b376f2b132cc86d59f444 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rui=20Tom=C3=A9?=
<108268980+r-tome@users.noreply.github.com>
Date: Mon, 4 Nov 2024 16:19:30 +0000
Subject: [PATCH 05/10] [PM-10323] Add delete option to managed members
(#11655)
* Add managedByOrganization property to OrganizationUserUserDetailsResponse and OrganizationUserView
* Add managedByOrganization property to OrganizationUserDetailsResponse and OrganizationUserAdminView
* Add deleteOrganizationUser method to OrganizationUserApiService
* Add copy strings for organization user delete dialog
* Add copy string for organization user deleted toast
* Add delete organization user dialog component
* Add the option to delete managed organization users from the members list
* Refactor delete user confirmation dialog in MembersComponent to use DialogService
* Delete DeleteOrganizationUserDialogComponent
* Refactor delete button in member dialog component to change the icon and tooltip text to 'Remove'
* Add delete button to members dialog if the user is managed by the organization
---
.../member-dialog.component.html | 10 ++++++
.../member-dialog/member-dialog.component.ts | 36 ++++++++++++++++++-
.../members/members.component.html | 11 ++++++
.../members/members.component.ts | 35 ++++++++++++++++++
apps/web/src/locales/en/messages.json | 26 ++++++++++++++
.../organization-user-api.service.ts | 7 ++++
.../default-organization-user-api.service.ts | 10 ++++++
7 files changed, 134 insertions(+), 1 deletion(-)
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 2c5daf93c6f..b2812727473 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
@@ -264,6 +264,16 @@
+
+
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 394c900f8d2..e61348e3841 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
@@ -518,6 +518,7 @@ export class MembersComponent extends BaseMembersComponent
isOnSecretsManagerStandalone: this.orgIsOnSecretsManagerStandalone,
initialTab: initialTab,
numConfirmedMembers: this.dataSource.confirmedUserCount,
+ managedByOrganization: user?.managedByOrganization,
},
});
@@ -725,6 +726,40 @@ export class MembersComponent extends BaseMembersComponent
return true;
}
+ async deleteUser(user: OrganizationUserView) {
+ const confirmed = await this.dialogService.openSimpleDialog({
+ title: {
+ key: "deleteOrganizationUser",
+ placeholders: [this.userNamePipe.transform(user)],
+ },
+ content: { key: "deleteOrganizationUserWarning" },
+ type: "warning",
+ acceptButtonText: { key: "delete" },
+ cancelButtonText: { key: "cancel" },
+ });
+
+ if (!confirmed) {
+ return false;
+ }
+
+ this.actionPromise = this.organizationUserApiService.deleteOrganizationUser(
+ this.organization.id,
+ user.id,
+ );
+ try {
+ await this.actionPromise;
+ this.toastService.showToast({
+ variant: "success",
+ title: null,
+ message: this.i18nService.t("organizationUserDeleted", this.userNamePipe.transform(user)),
+ });
+ this.dataSource.removeUser(user);
+ } catch (e) {
+ this.validationService.showError(e);
+ }
+ this.actionPromise = null;
+ }
+
private async noMasterPasswordConfirmationDialog(user: OrganizationUserView) {
return this.dialogService.openSimpleDialog({
title: {
diff --git a/apps/web/src/locales/en/messages.json b/apps/web/src/locales/en/messages.json
index 986648e5c16..7e441ae4ba2 100644
--- a/apps/web/src/locales/en/messages.json
+++ b/apps/web/src/locales/en/messages.json
@@ -9554,5 +9554,31 @@
},
"single-org-revoked-user-warning": {
"message": "Non-compliant members will be revoked. Administrators can restore members once they leave all other organizations."
+ },
+ "deleteOrganizationUser": {
+ "message": "Delete $NAME$",
+ "placeholders": {
+ "name": {
+ "content": "$1",
+ "example": "John Doe"
+ },
+ "description": "Title for the delete organization user dialog"
+ }
+ },
+ "deleteOrganizationUserWarning": {
+ "message": "When a member is deleted, their Bitwarden account and individual vault data will be permanently deleted. Collection data will remain in the organization. To reinstate them they must create an account and be onboarded again.",
+ "description": "Warning for the delete organization user dialog"
+ },
+ "organizationUserDeleted": {
+ "message": "Deleted $NAME$",
+ "placeholders": {
+ "name": {
+ "content": "$1",
+ "example": "John Doe"
+ }
+ }
+ },
+ "organizationUserDeletedDesc": {
+ "message": "The user was removed from the organization and all associated user data has been deleted."
}
}
diff --git a/libs/admin-console/src/common/organization-user/abstractions/organization-user-api.service.ts b/libs/admin-console/src/common/organization-user/abstractions/organization-user-api.service.ts
index ff7f9c5df6c..42cbe1438d1 100644
--- a/libs/admin-console/src/common/organization-user/abstractions/organization-user-api.service.ts
+++ b/libs/admin-console/src/common/organization-user/abstractions/organization-user-api.service.ts
@@ -275,4 +275,11 @@ export abstract class OrganizationUserApiService {
organizationId: string,
ids: string[],
): Promise>;
+
+ /**
+ * Remove an organization user's access to the organization and delete their account data
+ * @param organizationId - Identifier for the organization the user belongs to
+ * @param id - Organization user identifier
+ */
+ abstract deleteOrganizationUser(organizationId: string, id: string): Promise;
}
diff --git a/libs/admin-console/src/common/organization-user/services/default-organization-user-api.service.ts b/libs/admin-console/src/common/organization-user/services/default-organization-user-api.service.ts
index 6a9911e732c..d9e069dc934 100644
--- a/libs/admin-console/src/common/organization-user/services/default-organization-user-api.service.ts
+++ b/libs/admin-console/src/common/organization-user/services/default-organization-user-api.service.ts
@@ -359,4 +359,14 @@ export class DefaultOrganizationUserApiService implements OrganizationUserApiSer
);
return new ListResponse(r, OrganizationUserBulkResponse);
}
+
+ deleteOrganizationUser(organizationId: string, id: string): Promise {
+ return this.apiService.send(
+ "DELETE",
+ "/organizations/" + organizationId + "/users/" + id + "/delete-account",
+ null,
+ true,
+ false,
+ );
+ }
}
From d804a78bfbf5a6b92756cf0fd5db2deaa1bc968b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rui=20Tom=C3=A9?=
<108268980+r-tome@users.noreply.github.com>
Date: Mon, 4 Nov 2024 16:37:24 +0000
Subject: [PATCH 06/10] [PM-11406] Account Management: Prevent a verified user
from deleting their account (#11505)
* Update AccountService to include a method for setting the managedByOrganizationId
* Update AccountComponent to conditionally show the purgeVault button based on a feature flag and if the user is managed by an organization
* Add missing method to FakeAccountService
* Remove the setAccountManagedByOrganizationId method from the AccountService abstract class.
* Refactor AccountComponent to use OrganizationService to check for managing organization
* Rename managesActiveUser to userIsManagedByOrganization
* Hide the change email section if the user is managed by an organization
* Refactor userIsManagedByOrganization property to be non-nullable in organization data and response models
* Refactor organization.data.spec.ts to include non-nullable userIsManagedByOrganization property
* Refactor account component to conditionally show delete account button based on user's organization management status
* Add showDeleteAccount$ observable to AccountComponent
---
.../app/auth/settings/account/account.component.html | 8 +++++++-
.../app/auth/settings/account/account.component.ts | 11 +++++++++++
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/apps/web/src/app/auth/settings/account/account.component.html b/apps/web/src/app/auth/settings/account/account.component.html
index a5e5329fce7..4055f14219c 100644
--- a/apps/web/src/app/auth/settings/account/account.component.html
+++ b/apps/web/src/app/auth/settings/account/account.component.html
@@ -21,7 +21,13 @@
>
{{ "purgeVault" | i18n }}
-
- {{ "markCriticalApps" | i18n }}
+
+ {{ "markCriticalApps" | i18n }}
+
diff --git a/apps/web/src/app/tools/access-intelligence/critical-applications.component.ts b/apps/web/src/app/tools/access-intelligence/critical-applications.component.ts
index 545ba14d21c..a5df519fd80 100644
--- a/apps/web/src/app/tools/access-intelligence/critical-applications.component.ts
+++ b/apps/web/src/app/tools/access-intelligence/critical-applications.component.ts
@@ -1,7 +1,7 @@
import { Component, DestroyRef, inject, OnInit } from "@angular/core";
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
import { FormControl } from "@angular/forms";
-import { ActivatedRoute } from "@angular/router";
+import { ActivatedRoute, Router } from "@angular/router";
import { debounceTime, map } from "rxjs";
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
@@ -12,6 +12,7 @@ import { HeaderModule } from "../../layouts/header/header.module";
import { SharedModule } from "../../shared";
import { PipesModule } from "../../vault/individual-vault/pipes/pipes.module";
+import { AccessIntelligenceTabType } from "./access-intelligence.component";
import { applicationTableMockData } from "./application-table.mock";
@Component({
@@ -26,8 +27,10 @@ export class CriticalApplicationsComponent implements OnInit {
protected searchControl = new FormControl("", { nonNullable: true });
private destroyRef = inject(DestroyRef);
protected loading = false;
+ protected organizationId: string;
noItemsIcon = Icons.Security;
// MOCK DATA
+ protected mockData = applicationTableMockData;
protected mockAtRiskMembersCount = 0;
protected mockAtRiskAppsCount = 0;
protected mockTotalMembersCount = 0;
@@ -38,18 +41,26 @@ export class CriticalApplicationsComponent implements OnInit {
.pipe(
takeUntilDestroyed(this.destroyRef),
map(async (params) => {
- // const organizationId = params.get("organizationId");
+ this.organizationId = params.get("organizationId");
// TODO: use organizationId to fetch data
}),
)
.subscribe();
}
+ goToAllAppsTab = async () => {
+ await this.router.navigate([`organizations/${this.organizationId}/access-intelligence`], {
+ queryParams: { tabIndex: AccessIntelligenceTabType.AllApps },
+ queryParamsHandling: "merge",
+ });
+ };
+
constructor(
protected i18nService: I18nService,
protected activatedRoute: ActivatedRoute,
+ protected router: Router,
) {
- this.dataSource.data = applicationTableMockData;
+ this.dataSource.data = []; //applicationTableMockData;
this.searchControl.valueChanges
.pipe(debounceTime(200), takeUntilDestroyed())
.subscribe((v) => (this.dataSource.filter = v));