From 8ccece38e333791125389fc7c23fafe13d97c685 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 5 Nov 2024 12:48:47 -0500 Subject: [PATCH 1/9] [deps] Platform: Update Rust crate thiserror to v1.0.68 (#10562) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- apps/desktop/desktop_native/Cargo.lock | 8 ++++---- apps/desktop/desktop_native/core/Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/desktop/desktop_native/Cargo.lock b/apps/desktop/desktop_native/Cargo.lock index afe83b3f590..720f15b5c62 100644 --- a/apps/desktop/desktop_native/Cargo.lock +++ b/apps/desktop/desktop_native/Cargo.lock @@ -1867,18 +1867,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.61" +version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +checksum = "02dd99dc800bbb97186339685293e1cc5d9df1f8fae2d0aecd9ff1c77efea892" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.61" +version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +checksum = "a7c61ec9a6f64d2793d8a45faba21efbe3ced62a886d44c36a009b2b519b4c7e" dependencies = [ "proc-macro2", "quote", diff --git a/apps/desktop/desktop_native/core/Cargo.toml b/apps/desktop/desktop_native/core/Cargo.toml index 7c9c5de1554..151c2cc8bb0 100644 --- a/apps/desktop/desktop_native/core/Cargo.toml +++ b/apps/desktop/desktop_native/core/Cargo.toml @@ -38,7 +38,7 @@ rand = "=0.8.5" retry = "=2.0.0" scopeguard = "=1.2.0" sha2 = "=0.10.8" -thiserror = "=1.0.61" +thiserror = "=1.0.68" tokio = { version = "=1.41.0", features = ["io-util", "sync", "macros"] } tokio-util = "=0.7.12" typenum = "=1.17.0" From 12cf870e34c767231e3569cde32f93f25cfbf382 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 5 Nov 2024 13:13:52 -0500 Subject: [PATCH 2/9] [deps] Platform: Update Rust crate zbus to v4.4.0 (#10581) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- apps/desktop/desktop_native/Cargo.lock | 20 ++++++++++---------- apps/desktop/desktop_native/core/Cargo.toml | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/apps/desktop/desktop_native/Cargo.lock b/apps/desktop/desktop_native/Cargo.lock index 720f15b5c62..b10f1a0e5ed 100644 --- a/apps/desktop/desktop_native/Cargo.lock +++ b/apps/desktop/desktop_native/Cargo.lock @@ -2487,9 +2487,9 @@ dependencies = [ [[package]] name = "zbus" -version = "4.3.1" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "851238c133804e0aa888edf4a0229481c753544ca12a60fd1c3230c8a500fe40" +checksum = "bb97012beadd29e654708a0fdb4c84bc046f537aecfde2c3ee0a9e4b4d48c725" dependencies = [ "async-broadcast", "async-executor", @@ -2525,9 +2525,9 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "4.3.1" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d5a3f12c20bd473be3194af6b49d50d7bb804ef3192dc70eddedb26b85d9da7" +checksum = "267db9407081e90bbfa46d841d3cbc60f59c0351838c4bc65199ecd79ab1983e" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2583,9 +2583,9 @@ dependencies = [ [[package]] name = "zvariant" -version = "4.1.2" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1724a2b330760dc7d2a8402d841119dc869ef120b139d29862d6980e9c75bfc9" +checksum = "2084290ab9a1c471c38fc524945837734fbf124487e105daec2bb57fd48c81fe" dependencies = [ "endi", "enumflags2", @@ -2596,9 +2596,9 @@ dependencies = [ [[package]] name = "zvariant_derive" -version = "4.1.2" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55025a7a518ad14518fb243559c058a2e5b848b015e31f1d90414f36e3317859" +checksum = "73e2ba546bda683a90652bac4a279bc146adad1386f25379cf73200d2002c449" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2609,9 +2609,9 @@ dependencies = [ [[package]] name = "zvariant_utils" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc242db087efc22bd9ade7aa7809e4ba828132edc312871584a6b4391bdf8786" +checksum = "c51bcff7cc3dbb5055396bcf774748c3dab426b4b8659046963523cee4808340" dependencies = [ "proc-macro2", "quote", diff --git a/apps/desktop/desktop_native/core/Cargo.toml b/apps/desktop/desktop_native/core/Cargo.toml index 151c2cc8bb0..1eeaad8e640 100644 --- a/apps/desktop/desktop_native/core/Cargo.toml +++ b/apps/desktop/desktop_native/core/Cargo.toml @@ -68,5 +68,5 @@ security-framework-sys = { version = "=2.11.0", optional = true } [target.'cfg(target_os = "linux")'.dependencies] gio = { version = "=0.19.5", optional = true } libsecret = { version = "=0.5.0", optional = true } -zbus = { version = "=4.3.1", optional = true } +zbus = { version = "=4.4.0", optional = true } zbus_polkit = { version = "=4.0.0", optional = true } From 1e2a51a56b6f8aa3b9ff69feebd56753847b03ba Mon Sep 17 00:00:00 2001 From: Justin Baur <19896123+justindbaur@users.noreply.github.com> Date: Tue, 5 Nov 2024 13:55:31 -0500 Subject: [PATCH 3/9] Reverse Arguments (#11870) --- libs/common/src/services/api.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/common/src/services/api.service.ts b/libs/common/src/services/api.service.ts index f3bd93560b6..2d4a0522636 100644 --- a/libs/common/src/services/api.service.ts +++ b/libs/common/src/services/api.service.ts @@ -1847,8 +1847,8 @@ export class ApiService implements ApiServiceAbstraction { const [requestHeaders, requestBody] = await this.buildHeadersAndBody( authed, hasResponse, - alterHeaders, body, + alterHeaders, ); const requestInit: RequestInit = { From b5450227da9d60bf72b709001fc4ce23c7115151 Mon Sep 17 00:00:00 2001 From: Jared Snider <116684653+JaredSnider-Bitwarden@users.noreply.github.com> Date: Tue, 5 Nov 2024 14:02:51 -0500 Subject: [PATCH 4/9] PM-14424 - LoginComponents should listen for unauthUiRefresh flag changes and forcibly change the UI on browser & desktop to make for a seamless experience without having to refresh. (#11830) --- apps/browser/src/auth/popup/home.component.ts | 33 +++++++++++++++++-- .../src/auth/login/login-v1.component.ts | 30 ++++++++++++++++- .../auth/src/angular/login/login.component.ts | 31 ++++++++++++++++- 3 files changed, 90 insertions(+), 4 deletions(-) diff --git a/apps/browser/src/auth/popup/home.component.ts b/apps/browser/src/auth/popup/home.component.ts index cd9dfc3702b..4d185fcbfc6 100644 --- a/apps/browser/src/auth/popup/home.component.ts +++ b/apps/browser/src/auth/popup/home.component.ts @@ -1,10 +1,12 @@ import { Component, OnDestroy, OnInit, ViewChild } from "@angular/core"; import { FormBuilder, Validators } from "@angular/forms"; -import { Router } from "@angular/router"; -import { Subject, firstValueFrom, switchMap, takeUntil } from "rxjs"; +import { ActivatedRoute, Router } from "@angular/router"; +import { Subject, firstValueFrom, switchMap, takeUntil, tap } from "rxjs"; import { EnvironmentSelectorComponent } from "@bitwarden/angular/auth/components/environment-selector.component"; import { LoginEmailServiceAbstraction, RegisterRouteService } from "@bitwarden/auth/common"; +import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum"; +import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { ToastService } from "@bitwarden/components"; @@ -38,9 +40,13 @@ export class HomeComponent implements OnInit, OnDestroy { private accountSwitcherService: AccountSwitcherService, private registerRouteService: RegisterRouteService, private toastService: ToastService, + private configService: ConfigService, + private route: ActivatedRoute, ) {} async ngOnInit(): Promise { + this.listenForUnauthUiRefreshFlagChanges(); + const email = await firstValueFrom(this.loginEmailService.loginEmail$); const rememberEmail = this.loginEmailService.getRememberEmail(); @@ -70,6 +76,29 @@ export class HomeComponent implements OnInit, OnDestroy { this.destroyed$.complete(); } + private listenForUnauthUiRefreshFlagChanges() { + this.configService + .getFeatureFlag$(FeatureFlag.UnauthenticatedExtensionUIRefresh) + .pipe( + tap(async (flag) => { + // If the flag is turned ON, we must force a reload to ensure the correct UI is shown + if (flag) { + const uniqueQueryParams = { + ...this.route.queryParams, + // adding a unique timestamp to the query params to force a reload + t: new Date().getTime().toString(), + }; + + await this.router.navigate(["/login"], { + queryParams: uniqueQueryParams, + }); + } + }), + takeUntil(this.destroyed$), + ) + .subscribe(); + } + get availableAccounts$() { return this.accountSwitcherService.availableAccounts$; } diff --git a/apps/desktop/src/auth/login/login-v1.component.ts b/apps/desktop/src/auth/login/login-v1.component.ts index 6eb069d9bcb..132b430f327 100644 --- a/apps/desktop/src/auth/login/login-v1.component.ts +++ b/apps/desktop/src/auth/login/login-v1.component.ts @@ -1,7 +1,7 @@ import { Component, NgZone, OnDestroy, OnInit, ViewChild, ViewContainerRef } from "@angular/core"; import { FormBuilder } from "@angular/forms"; import { ActivatedRoute, Router } from "@angular/router"; -import { Subject, takeUntil } from "rxjs"; +import { Subject, takeUntil, tap } from "rxjs"; import { LoginComponentV1 as BaseLoginComponent } from "@bitwarden/angular/auth/components/login-v1.component"; import { FormValidationErrorsService } from "@bitwarden/angular/platform/abstractions/form-validation-errors.service"; @@ -14,8 +14,10 @@ import { import { DevicesApiServiceAbstraction } from "@bitwarden/common/auth/abstractions/devices-api.service.abstraction"; import { SsoLoginServiceAbstraction } from "@bitwarden/common/auth/abstractions/sso-login.service.abstraction"; import { WebAuthnLoginServiceAbstraction } from "@bitwarden/common/auth/abstractions/webauthn/webauthn-login.service.abstraction"; +import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum"; import { AppIdService } from "@bitwarden/common/platform/abstractions/app-id.service"; import { BroadcasterService } from "@bitwarden/common/platform/abstractions/broadcaster.service"; +import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service"; import { CryptoFunctionService } from "@bitwarden/common/platform/abstractions/crypto-function.service"; import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; @@ -76,6 +78,7 @@ export class LoginComponentV1 extends BaseLoginComponent implements OnInit, OnDe webAuthnLoginService: WebAuthnLoginServiceAbstraction, registerRouteService: RegisterRouteService, toastService: ToastService, + private configService: ConfigService, ) { super( devicesApiService, @@ -105,6 +108,8 @@ export class LoginComponentV1 extends BaseLoginComponent implements OnInit, OnDe } async ngOnInit() { + this.listenForUnauthUiRefreshFlagChanges(); + await super.ngOnInit(); await this.getLoginWithDevice(this.loggedEmail); this.broadcasterService.subscribe(BroadcasterSubscriptionId, async (message: any) => { @@ -137,6 +142,29 @@ export class LoginComponentV1 extends BaseLoginComponent implements OnInit, OnDe this.componentDestroyed$.complete(); } + private listenForUnauthUiRefreshFlagChanges() { + this.configService + .getFeatureFlag$(FeatureFlag.UnauthenticatedExtensionUIRefresh) + .pipe( + tap(async (flag) => { + // If the flag is turned ON, we must force a reload to ensure the correct UI is shown + if (flag) { + const uniqueQueryParams = { + ...this.route.queryParams, + // adding a unique timestamp to the query params to force a reload + t: new Date().getTime().toString(), + }; + + await this.router.navigate(["/"], { + queryParams: uniqueQueryParams, + }); + } + }), + takeUntil(this.destroy$), + ) + .subscribe(); + } + async settings() { const [modal, childComponent] = await this.modalService.openViewRef( EnvironmentComponent, diff --git a/libs/auth/src/angular/login/login.component.ts b/libs/auth/src/angular/login/login.component.ts index 239383ddd00..0193e4c4035 100644 --- a/libs/auth/src/angular/login/login.component.ts +++ b/libs/auth/src/angular/login/login.component.ts @@ -2,7 +2,7 @@ import { CommonModule } from "@angular/common"; import { Component, ElementRef, Input, NgZone, OnDestroy, OnInit, ViewChild } from "@angular/core"; import { FormBuilder, FormControl, ReactiveFormsModule, Validators } from "@angular/forms"; import { ActivatedRoute, Router, RouterModule } from "@angular/router"; -import { firstValueFrom, Subject, take, takeUntil } from "rxjs"; +import { firstValueFrom, Subject, take, takeUntil, tap } from "rxjs"; import { JslibModule } from "@bitwarden/angular/jslib.module"; import { @@ -19,9 +19,11 @@ import { CaptchaIFrame } from "@bitwarden/common/auth/captcha-iframe"; import { AuthResult } from "@bitwarden/common/auth/models/domain/auth-result"; import { ForceSetPasswordReason } from "@bitwarden/common/auth/models/domain/force-set-password-reason"; import { ClientType, HttpStatusCode } from "@bitwarden/common/enums"; +import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum"; import { ErrorResponse } from "@bitwarden/common/models/response/error.response"; import { AppIdService } from "@bitwarden/common/platform/abstractions/app-id.service"; import { BroadcasterService } from "@bitwarden/common/platform/abstractions/broadcaster.service"; +import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service"; import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; @@ -139,12 +141,16 @@ export class LoginComponent implements OnInit, OnDestroy { private toastService: ToastService, private logService: LogService, private validationService: ValidationService, + private configService: ConfigService, ) { this.clientType = this.platformUtilsService.getClientType(); this.loginViaAuthRequestSupported = this.loginComponentService.isLoginViaAuthRequestSupported(); } async ngOnInit(): Promise { + // TODO: remove this when the UnauthenticatedExtensionUIRefresh feature flag is removed. + this.listenForUnauthUiRefreshFlagChanges(); + await this.defaultOnInit(); if (this.clientType === ClientType.Desktop) { @@ -162,6 +168,29 @@ export class LoginComponent implements OnInit, OnDestroy { this.destroy$.complete(); } + private listenForUnauthUiRefreshFlagChanges() { + this.configService + .getFeatureFlag$(FeatureFlag.UnauthenticatedExtensionUIRefresh) + .pipe( + tap(async (flag) => { + // If the flag is turned OFF, we must force a reload to ensure the correct UI is shown + if (!flag) { + const uniqueQueryParams = { + ...this.activatedRoute.queryParams, + // adding a unique timestamp to the query params to force a reload + t: new Date().getTime().toString(), // Adding a unique timestamp as a query parameter + }; + + await this.router.navigate(["/"], { + queryParams: uniqueQueryParams, + }); + } + }), + takeUntil(this.destroy$), + ) + .subscribe(); + } + submit = async (): Promise => { if (this.clientType === ClientType.Desktop) { if (this.loginUiState !== LoginUiState.MASTER_PASSWORD_ENTRY) { From 350a85674d73d3f3c7e0187c3b843e1fd17c594d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 5 Nov 2024 14:20:41 -0500 Subject: [PATCH 5/9] [deps] Platform: Update Rust crate napi to v2.16.13 (#11533) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- apps/desktop/desktop_native/Cargo.lock | 4 ++-- apps/desktop/desktop_native/napi/Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/desktop/desktop_native/Cargo.lock b/apps/desktop/desktop_native/Cargo.lock index b10f1a0e5ed..490ea1997d0 100644 --- a/apps/desktop/desktop_native/Cargo.lock +++ b/apps/desktop/desktop_native/Cargo.lock @@ -1154,9 +1154,9 @@ dependencies = [ [[package]] name = "napi" -version = "2.16.11" +version = "2.16.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53575dfa17f208dd1ce3a2da2da4659aae393b256a472f2738a8586a6c4107fd" +checksum = "214f07a80874bb96a8433b3cdfc84980d56c7b02e1a0d7ba4ba0db5cef785e2b" dependencies = [ "bitflags", "ctor", diff --git a/apps/desktop/desktop_native/napi/Cargo.toml b/apps/desktop/desktop_native/napi/Cargo.toml index 6da4fcb0153..d5376b3eaa9 100644 --- a/apps/desktop/desktop_native/napi/Cargo.toml +++ b/apps/desktop/desktop_native/napi/Cargo.toml @@ -16,7 +16,7 @@ manual_test = [] [dependencies] anyhow = "=1.0.86" desktop_core = { path = "../core" } -napi = { version = "=2.16.11", features = ["async"] } +napi = { version = "=2.16.13", features = ["async"] } napi-derive = "=2.16.12" tokio = { version = "1.38.0" } tokio-util = "0.7.11" From 52c7d21e5f13cfca13d08a8762a177835daa3d6d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 6 Nov 2024 02:59:35 -0500 Subject: [PATCH 6/9] [deps] Platform: Update Rust crate anyhow to v1.0.93 (#11059) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- apps/desktop/desktop_native/Cargo.lock | 4 ++-- apps/desktop/desktop_native/core/Cargo.toml | 2 +- apps/desktop/desktop_native/napi/Cargo.toml | 2 +- apps/desktop/desktop_native/proxy/Cargo.toml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/desktop/desktop_native/Cargo.lock b/apps/desktop/desktop_native/Cargo.lock index 490ea1997d0..d8a7c470eba 100644 --- a/apps/desktop/desktop_native/Cargo.lock +++ b/apps/desktop/desktop_native/Cargo.lock @@ -39,9 +39,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" [[package]] name = "arboard" diff --git a/apps/desktop/desktop_native/core/Cargo.toml b/apps/desktop/desktop_native/core/Cargo.toml index 1eeaad8e640..a56c1b57434 100644 --- a/apps/desktop/desktop_native/core/Cargo.toml +++ b/apps/desktop/desktop_native/core/Cargo.toml @@ -23,7 +23,7 @@ sys = [ [dependencies] aes = "=0.8.4" -anyhow = "=1.0.86" +anyhow = "=1.0.93" arboard = { version = "=3.4.1", default-features = false, features = [ "wayland-data-control", ] } diff --git a/apps/desktop/desktop_native/napi/Cargo.toml b/apps/desktop/desktop_native/napi/Cargo.toml index d5376b3eaa9..64ab106e576 100644 --- a/apps/desktop/desktop_native/napi/Cargo.toml +++ b/apps/desktop/desktop_native/napi/Cargo.toml @@ -14,7 +14,7 @@ default = [] manual_test = [] [dependencies] -anyhow = "=1.0.86" +anyhow = "=1.0.93" desktop_core = { path = "../core" } napi = { version = "=2.16.13", features = ["async"] } napi-derive = "=2.16.12" diff --git a/apps/desktop/desktop_native/proxy/Cargo.toml b/apps/desktop/desktop_native/proxy/Cargo.toml index 6f8005811d6..a1cefca7a3f 100644 --- a/apps/desktop/desktop_native/proxy/Cargo.toml +++ b/apps/desktop/desktop_native/proxy/Cargo.toml @@ -7,7 +7,7 @@ version = "0.0.0" publish = false [dependencies] -anyhow = "=1.0.86" +anyhow = "=1.0.93" desktop_core = { path = "../core", default-features = false } futures = "0.3.30" log = "0.4.22" From b877624ce3c12c1063ada58655b50f730b220e2a Mon Sep 17 00:00:00 2001 From: Jordan Aasen <166539328+jaasen-livefront@users.noreply.github.com> Date: Wed, 6 Nov 2024 06:47:29 -0800 Subject: [PATCH 7/9] [PM-14462] - Update "Access Intelligence" to "Risk Insights" (#11853) * rename acess intelligence to risk insights * keep branch name * replace all instances of AccessIntelligence. strip raw data + members to just the table * revert change to feature flag name --- .../organization-layout.component.html | 6 +- .../layouts/organization-layout.component.ts | 4 +- .../organization-routing.module.ts | 6 +- .../access-intelligence.module.ts | 9 -- .../password-health-members.component.html | 120 ------------------ .../all-applications.component.html | 0 .../all-applications.component.ts | 0 .../application-table.mock.ts | 0 .../critical-applications.component.html | 0 .../critical-applications.component.ts | 6 +- .../notified-members-table.component.html | 0 .../notified-members-table.component.ts | 0 ...password-health-members-uri.component.html | 0 ...sword-health-members-uri.component.spec.ts | 2 +- .../password-health-members-uri.component.ts | 2 +- .../password-health-members.component.html | 64 ++++++++++ .../password-health-members.component.ts | 2 +- .../password-health.component.html | 0 .../password-health.component.spec.ts | 2 +- .../password-health.component.ts | 2 +- .../risk-insights-routing.module.ts} | 8 +- .../risk-insights.component.html} | 2 +- .../risk-insights.component.ts} | 10 +- .../risk-insights/risk-insights.module.ts | 9 ++ apps/web/src/locales/en/messages.json | 4 +- .../index.ts | 0 .../member-cipher-details.response.ts | 0 .../services/ciphers.mock.ts | 0 .../services/index.ts | 0 .../member-cipher-details-api.service.spec.ts | 0 .../member-cipher-details-api.service.ts | 0 .../member-cipher-details-response.mock.ts | 0 .../services/password-health.service.spec.ts | 0 .../services/password-health.service.ts | 4 +- 34 files changed, 103 insertions(+), 159 deletions(-) delete mode 100644 apps/web/src/app/tools/access-intelligence/access-intelligence.module.ts delete mode 100644 apps/web/src/app/tools/access-intelligence/password-health-members.component.html rename apps/web/src/app/tools/{access-intelligence => risk-insights}/all-applications.component.html (100%) rename apps/web/src/app/tools/{access-intelligence => risk-insights}/all-applications.component.ts (100%) rename apps/web/src/app/tools/{access-intelligence => risk-insights}/application-table.mock.ts (100%) rename apps/web/src/app/tools/{access-intelligence => risk-insights}/critical-applications.component.html (100%) rename apps/web/src/app/tools/{access-intelligence => risk-insights}/critical-applications.component.ts (93%) rename apps/web/src/app/tools/{access-intelligence => risk-insights}/notified-members-table.component.html (100%) rename apps/web/src/app/tools/{access-intelligence => risk-insights}/notified-members-table.component.ts (100%) rename apps/web/src/app/tools/{access-intelligence => risk-insights}/password-health-members-uri.component.html (100%) rename apps/web/src/app/tools/{access-intelligence => risk-insights}/password-health-members-uri.component.spec.ts (98%) rename apps/web/src/app/tools/{access-intelligence => risk-insights}/password-health-members-uri.component.ts (99%) create mode 100644 apps/web/src/app/tools/risk-insights/password-health-members.component.html rename apps/web/src/app/tools/{access-intelligence => risk-insights}/password-health-members.component.ts (99%) rename apps/web/src/app/tools/{access-intelligence => risk-insights}/password-health.component.html (100%) rename apps/web/src/app/tools/{access-intelligence => risk-insights}/password-health.component.spec.ts (98%) rename apps/web/src/app/tools/{access-intelligence => risk-insights}/password-health.component.ts (98%) rename apps/web/src/app/tools/{access-intelligence/access-intelligence-routing.module.ts => risk-insights/risk-insights-routing.module.ts} (70%) rename apps/web/src/app/tools/{access-intelligence/access-intelligence.component.html => risk-insights/risk-insights.component.html} (94%) rename apps/web/src/app/tools/{access-intelligence/access-intelligence.component.ts => risk-insights/risk-insights.component.ts} (88%) create mode 100644 apps/web/src/app/tools/risk-insights/risk-insights.module.ts rename bitwarden_license/bit-common/src/tools/reports/{access-intelligence => risk-insights}/index.ts (100%) rename bitwarden_license/bit-common/src/tools/reports/{access-intelligence => risk-insights}/response/member-cipher-details.response.ts (100%) rename bitwarden_license/bit-common/src/tools/reports/{access-intelligence => risk-insights}/services/ciphers.mock.ts (100%) rename bitwarden_license/bit-common/src/tools/reports/{access-intelligence => risk-insights}/services/index.ts (100%) rename bitwarden_license/bit-common/src/tools/reports/{access-intelligence => risk-insights}/services/member-cipher-details-api.service.spec.ts (100%) rename bitwarden_license/bit-common/src/tools/reports/{access-intelligence => risk-insights}/services/member-cipher-details-api.service.ts (100%) rename bitwarden_license/bit-common/src/tools/reports/{access-intelligence => risk-insights}/services/member-cipher-details-response.mock.ts (100%) rename bitwarden_license/bit-common/src/tools/reports/{access-intelligence => risk-insights}/services/password-health.service.spec.ts (100%) rename bitwarden_license/bit-common/src/tools/reports/{access-intelligence => risk-insights}/services/password-health.service.ts (97%) 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 23e9c6df178..9cd94c5208c 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 @@ -40,9 +40,9 @@ > ; hideNewOrgButton$: Observable; organizationIsUnmanaged$: Observable; - isAccessIntelligenceFeatureEnabled = false; + isRiskInsightsFeatureEnabled = false; private _destroy = new Subject(); @@ -71,7 +71,7 @@ export class OrganizationLayoutComponent implements OnInit, OnDestroy { async ngOnInit() { document.body.classList.remove("layout_frontend"); - this.isAccessIntelligenceFeatureEnabled = await this.configService.getFeatureFlag( + this.isRiskInsightsFeatureEnabled = await this.configService.getFeatureFlag( FeatureFlag.AccessIntelligence, ); diff --git a/apps/web/src/app/admin-console/organizations/organization-routing.module.ts b/apps/web/src/app/admin-console/organizations/organization-routing.module.ts index a36b267e2fe..1725148d477 100644 --- a/apps/web/src/app/admin-console/organizations/organization-routing.module.ts +++ b/apps/web/src/app/admin-console/organizations/organization-routing.module.ts @@ -63,10 +63,10 @@ const routes: Routes = [ ), }, { - path: "access-intelligence", + path: "risk-insights", loadChildren: () => - import("../../tools/access-intelligence/access-intelligence.module").then( - (m) => m.AccessIntelligenceModule, + import("../../tools/risk-insights/risk-insights.module").then( + (m) => m.RiskInsightsModule, ), }, { diff --git a/apps/web/src/app/tools/access-intelligence/access-intelligence.module.ts b/apps/web/src/app/tools/access-intelligence/access-intelligence.module.ts deleted file mode 100644 index 32b66935b69..00000000000 --- a/apps/web/src/app/tools/access-intelligence/access-intelligence.module.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { NgModule } from "@angular/core"; - -import { AccessIntelligenceRoutingModule } from "./access-intelligence-routing.module"; -import { AccessIntelligenceComponent } from "./access-intelligence.component"; - -@NgModule({ - imports: [AccessIntelligenceComponent, AccessIntelligenceRoutingModule], -}) -export class AccessIntelligenceModule {} diff --git a/apps/web/src/app/tools/access-intelligence/password-health-members.component.html b/apps/web/src/app/tools/access-intelligence/password-health-members.component.html deleted file mode 100644 index 611443c993a..00000000000 --- a/apps/web/src/app/tools/access-intelligence/password-health-members.component.html +++ /dev/null @@ -1,120 +0,0 @@ -

{{ "passwordsReportDesc" | i18n }}

-
- - {{ "loading" | i18n }} -
-
-
- - - - -
-
- - -
-
-
- - - - -
-
- - -
- - - - - {{ "name" | i18n }} - {{ "weakness" | i18n }} - {{ "timesReused" | i18n }} - {{ "timesExposed" | i18n }} - {{ "totalMembers" | i18n }} - - - - - - - - - - {{ r.name }} - -
- {{ r.subTitle }} - - - - {{ passwordStrengthMap.get(r.id)[0] | i18n }} - - - - - {{ "reusedXTimes" | i18n: passwordUseMap.get(r.login.password) }} - - - - - {{ "exposedXTimes" | i18n: exposedPasswordMap.get(r.id) }} - - - - {{ totalMembersMap.get(r.id) || 0 }} - - -
-
-
-
diff --git a/apps/web/src/app/tools/access-intelligence/all-applications.component.html b/apps/web/src/app/tools/risk-insights/all-applications.component.html similarity index 100% rename from apps/web/src/app/tools/access-intelligence/all-applications.component.html rename to apps/web/src/app/tools/risk-insights/all-applications.component.html diff --git a/apps/web/src/app/tools/access-intelligence/all-applications.component.ts b/apps/web/src/app/tools/risk-insights/all-applications.component.ts similarity index 100% rename from apps/web/src/app/tools/access-intelligence/all-applications.component.ts rename to apps/web/src/app/tools/risk-insights/all-applications.component.ts diff --git a/apps/web/src/app/tools/access-intelligence/application-table.mock.ts b/apps/web/src/app/tools/risk-insights/application-table.mock.ts similarity index 100% rename from apps/web/src/app/tools/access-intelligence/application-table.mock.ts rename to apps/web/src/app/tools/risk-insights/application-table.mock.ts diff --git a/apps/web/src/app/tools/access-intelligence/critical-applications.component.html b/apps/web/src/app/tools/risk-insights/critical-applications.component.html similarity index 100% rename from apps/web/src/app/tools/access-intelligence/critical-applications.component.html rename to apps/web/src/app/tools/risk-insights/critical-applications.component.html diff --git a/apps/web/src/app/tools/access-intelligence/critical-applications.component.ts b/apps/web/src/app/tools/risk-insights/critical-applications.component.ts similarity index 93% rename from apps/web/src/app/tools/access-intelligence/critical-applications.component.ts rename to apps/web/src/app/tools/risk-insights/critical-applications.component.ts index a5df519fd80..0779b2977e5 100644 --- a/apps/web/src/app/tools/access-intelligence/critical-applications.component.ts +++ b/apps/web/src/app/tools/risk-insights/critical-applications.component.ts @@ -12,8 +12,8 @@ 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"; +import { RiskInsightsTabType } from "./risk-insights.component"; @Component({ standalone: true, @@ -49,8 +49,8 @@ export class CriticalApplicationsComponent implements OnInit { } goToAllAppsTab = async () => { - await this.router.navigate([`organizations/${this.organizationId}/access-intelligence`], { - queryParams: { tabIndex: AccessIntelligenceTabType.AllApps }, + await this.router.navigate([`organizations/${this.organizationId}/risk-insights`], { + queryParams: { tabIndex: RiskInsightsTabType.AllApps }, queryParamsHandling: "merge", }); }; diff --git a/apps/web/src/app/tools/access-intelligence/notified-members-table.component.html b/apps/web/src/app/tools/risk-insights/notified-members-table.component.html similarity index 100% rename from apps/web/src/app/tools/access-intelligence/notified-members-table.component.html rename to apps/web/src/app/tools/risk-insights/notified-members-table.component.html diff --git a/apps/web/src/app/tools/access-intelligence/notified-members-table.component.ts b/apps/web/src/app/tools/risk-insights/notified-members-table.component.ts similarity index 100% rename from apps/web/src/app/tools/access-intelligence/notified-members-table.component.ts rename to apps/web/src/app/tools/risk-insights/notified-members-table.component.ts diff --git a/apps/web/src/app/tools/access-intelligence/password-health-members-uri.component.html b/apps/web/src/app/tools/risk-insights/password-health-members-uri.component.html similarity index 100% rename from apps/web/src/app/tools/access-intelligence/password-health-members-uri.component.html rename to apps/web/src/app/tools/risk-insights/password-health-members-uri.component.html diff --git a/apps/web/src/app/tools/access-intelligence/password-health-members-uri.component.spec.ts b/apps/web/src/app/tools/risk-insights/password-health-members-uri.component.spec.ts similarity index 98% rename from apps/web/src/app/tools/access-intelligence/password-health-members-uri.component.spec.ts rename to apps/web/src/app/tools/risk-insights/password-health-members-uri.component.spec.ts index 376ae16e232..b34730bd328 100644 --- a/apps/web/src/app/tools/access-intelligence/password-health-members-uri.component.spec.ts +++ b/apps/web/src/app/tools/risk-insights/password-health-members-uri.component.spec.ts @@ -4,7 +4,7 @@ import { mock, MockProxy } from "jest-mock-extended"; import { of } from "rxjs"; // eslint-disable-next-line no-restricted-imports -import { PasswordHealthService } from "@bitwarden/bit-common/tools/reports/access-intelligence"; +import { PasswordHealthService } from "@bitwarden/bit-common/tools/reports/risk-insights"; import { AuditService } from "@bitwarden/common/abstractions/audit.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; diff --git a/apps/web/src/app/tools/access-intelligence/password-health-members-uri.component.ts b/apps/web/src/app/tools/risk-insights/password-health-members-uri.component.ts similarity index 99% rename from apps/web/src/app/tools/access-intelligence/password-health-members-uri.component.ts rename to apps/web/src/app/tools/risk-insights/password-health-members-uri.component.ts index 0059964f41b..c977c829537 100644 --- a/apps/web/src/app/tools/access-intelligence/password-health-members-uri.component.ts +++ b/apps/web/src/app/tools/risk-insights/password-health-members-uri.component.ts @@ -6,7 +6,7 @@ import { map } from "rxjs"; import { JslibModule } from "@bitwarden/angular/jslib.module"; // eslint-disable-next-line no-restricted-imports -import { PasswordHealthService } from "@bitwarden/bit-common/tools/reports/access-intelligence"; +import { PasswordHealthService } from "@bitwarden/bit-common/tools/reports/risk-insights"; import { AuditService } from "@bitwarden/common/abstractions/audit.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; diff --git a/apps/web/src/app/tools/risk-insights/password-health-members.component.html b/apps/web/src/app/tools/risk-insights/password-health-members.component.html new file mode 100644 index 00000000000..7f9b37f2a82 --- /dev/null +++ b/apps/web/src/app/tools/risk-insights/password-health-members.component.html @@ -0,0 +1,64 @@ +

{{ "passwordsReportDesc" | i18n }}

+
+ + {{ "loading" | i18n }} +
+
+ + + + + {{ "name" | i18n }} + {{ "weakness" | i18n }} + {{ "timesReused" | i18n }} + {{ "timesExposed" | i18n }} + {{ "totalMembers" | i18n }} + + + + + + + + + + {{ r.name }} + +
+ {{ r.subTitle }} + + + + {{ passwordStrengthMap.get(r.id)[0] | i18n }} + + + + + {{ "reusedXTimes" | i18n: passwordUseMap.get(r.login.password) }} + + + + + {{ "exposedXTimes" | i18n: exposedPasswordMap.get(r.id) }} + + + + {{ totalMembersMap.get(r.id) || 0 }} + + +
+
+
diff --git a/apps/web/src/app/tools/access-intelligence/password-health-members.component.ts b/apps/web/src/app/tools/risk-insights/password-health-members.component.ts similarity index 99% rename from apps/web/src/app/tools/access-intelligence/password-health-members.component.ts rename to apps/web/src/app/tools/risk-insights/password-health-members.component.ts index 9d457013e84..2581de78ed5 100644 --- a/apps/web/src/app/tools/access-intelligence/password-health-members.component.ts +++ b/apps/web/src/app/tools/risk-insights/password-health-members.component.ts @@ -5,7 +5,7 @@ import { ActivatedRoute } from "@angular/router"; import { debounceTime, map } from "rxjs"; // eslint-disable-next-line no-restricted-imports -import { PasswordHealthService } from "@bitwarden/bit-common/tools/reports/access-intelligence"; +import { PasswordHealthService } from "@bitwarden/bit-common/tools/reports/risk-insights"; import { AuditService } from "@bitwarden/common/abstractions/audit.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { PasswordStrengthServiceAbstraction } from "@bitwarden/common/tools/password-strength"; diff --git a/apps/web/src/app/tools/access-intelligence/password-health.component.html b/apps/web/src/app/tools/risk-insights/password-health.component.html similarity index 100% rename from apps/web/src/app/tools/access-intelligence/password-health.component.html rename to apps/web/src/app/tools/risk-insights/password-health.component.html diff --git a/apps/web/src/app/tools/access-intelligence/password-health.component.spec.ts b/apps/web/src/app/tools/risk-insights/password-health.component.spec.ts similarity index 98% rename from apps/web/src/app/tools/access-intelligence/password-health.component.spec.ts rename to apps/web/src/app/tools/risk-insights/password-health.component.spec.ts index d41807e7d2d..50295b435b2 100644 --- a/apps/web/src/app/tools/access-intelligence/password-health.component.spec.ts +++ b/apps/web/src/app/tools/risk-insights/password-health.component.spec.ts @@ -4,7 +4,7 @@ import { mock } from "jest-mock-extended"; import { of } from "rxjs"; // eslint-disable-next-line no-restricted-imports -import { PasswordHealthService } from "@bitwarden/bit-common/tools/reports/access-intelligence"; +import { PasswordHealthService } from "@bitwarden/bit-common/tools/reports/risk-insights"; import { AuditService } from "@bitwarden/common/abstractions/audit.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { PasswordStrengthServiceAbstraction } from "@bitwarden/common/tools/password-strength"; diff --git a/apps/web/src/app/tools/access-intelligence/password-health.component.ts b/apps/web/src/app/tools/risk-insights/password-health.component.ts similarity index 98% rename from apps/web/src/app/tools/access-intelligence/password-health.component.ts rename to apps/web/src/app/tools/risk-insights/password-health.component.ts index 4b7b8e394d3..c3c1732854d 100644 --- a/apps/web/src/app/tools/access-intelligence/password-health.component.ts +++ b/apps/web/src/app/tools/risk-insights/password-health.component.ts @@ -6,7 +6,7 @@ import { map } from "rxjs"; import { JslibModule } from "@bitwarden/angular/jslib.module"; // eslint-disable-next-line no-restricted-imports -import { PasswordHealthService } from "@bitwarden/bit-common/tools/reports/access-intelligence"; +import { PasswordHealthService } from "@bitwarden/bit-common/tools/reports/risk-insights"; import { AuditService } from "@bitwarden/common/abstractions/audit.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { PasswordStrengthServiceAbstraction } from "@bitwarden/common/tools/password-strength"; diff --git a/apps/web/src/app/tools/access-intelligence/access-intelligence-routing.module.ts b/apps/web/src/app/tools/risk-insights/risk-insights-routing.module.ts similarity index 70% rename from apps/web/src/app/tools/access-intelligence/access-intelligence-routing.module.ts rename to apps/web/src/app/tools/risk-insights/risk-insights-routing.module.ts index 88efb2b4832..19cc6f6832c 100644 --- a/apps/web/src/app/tools/access-intelligence/access-intelligence-routing.module.ts +++ b/apps/web/src/app/tools/risk-insights/risk-insights-routing.module.ts @@ -4,15 +4,15 @@ import { RouterModule, Routes } from "@angular/router"; import { canAccessFeature } from "@bitwarden/angular/platform/guard/feature-flag.guard"; import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum"; -import { AccessIntelligenceComponent } from "./access-intelligence.component"; +import { RiskInsightsComponent } from "./risk-insights.component"; const routes: Routes = [ { path: "", - component: AccessIntelligenceComponent, + component: RiskInsightsComponent, canActivate: [canAccessFeature(FeatureFlag.AccessIntelligence)], data: { - titleId: "accessIntelligence", + titleId: "RiskInsights", }, }, ]; @@ -21,4 +21,4 @@ const routes: Routes = [ imports: [RouterModule.forChild(routes)], exports: [RouterModule], }) -export class AccessIntelligenceRoutingModule {} +export class RiskInsightsRoutingModule {} diff --git a/apps/web/src/app/tools/access-intelligence/access-intelligence.component.html b/apps/web/src/app/tools/risk-insights/risk-insights.component.html similarity index 94% rename from apps/web/src/app/tools/access-intelligence/access-intelligence.component.html rename to apps/web/src/app/tools/risk-insights/risk-insights.component.html index 0f62a434648..90d9ce696d6 100644 --- a/apps/web/src/app/tools/access-intelligence/access-intelligence.component.html +++ b/apps/web/src/app/tools/risk-insights/risk-insights.component.html @@ -1,4 +1,4 @@ -
{{ "accessIntelligence" | i18n }}
+
{{ "riskInsights" | i18n }}

{{ "passwordRisk" | i18n }}

{{ "discoverAtRiskPasswords" | i18n }}
diff --git a/apps/web/src/app/tools/access-intelligence/access-intelligence.component.ts b/apps/web/src/app/tools/risk-insights/risk-insights.component.ts similarity index 88% rename from apps/web/src/app/tools/access-intelligence/access-intelligence.component.ts rename to apps/web/src/app/tools/risk-insights/risk-insights.component.ts index 557ae73625a..43d6da70e96 100644 --- a/apps/web/src/app/tools/access-intelligence/access-intelligence.component.ts +++ b/apps/web/src/app/tools/risk-insights/risk-insights.component.ts @@ -15,7 +15,7 @@ import { PasswordHealthMembersURIComponent } from "./password-health-members-uri import { PasswordHealthMembersComponent } from "./password-health-members.component"; import { PasswordHealthComponent } from "./password-health.component"; -export enum AccessIntelligenceTabType { +export enum RiskInsightsTabType { AllApps = 0, CriticalApps = 1, NotifiedMembers = 2, @@ -23,7 +23,7 @@ export enum AccessIntelligenceTabType { @Component({ standalone: true, - templateUrl: "./access-intelligence.component.html", + templateUrl: "./risk-insights.component.html", imports: [ AllApplicationsComponent, AsyncActionsModule, @@ -39,8 +39,8 @@ export enum AccessIntelligenceTabType { TabsModule, ], }) -export class AccessIntelligenceComponent { - tabIndex: AccessIntelligenceTabType; +export class RiskInsightsComponent { + tabIndex: RiskInsightsTabType; dataLastUpdated = new Date(); apps: any[] = []; @@ -70,7 +70,7 @@ export class AccessIntelligenceComponent { private router: Router, ) { route.queryParams.pipe(takeUntilDestroyed()).subscribe(({ tabIndex }) => { - this.tabIndex = !isNaN(tabIndex) ? tabIndex : AccessIntelligenceTabType.AllApps; + this.tabIndex = !isNaN(tabIndex) ? tabIndex : RiskInsightsTabType.AllApps; }); } } diff --git a/apps/web/src/app/tools/risk-insights/risk-insights.module.ts b/apps/web/src/app/tools/risk-insights/risk-insights.module.ts new file mode 100644 index 00000000000..23d3cd8089b --- /dev/null +++ b/apps/web/src/app/tools/risk-insights/risk-insights.module.ts @@ -0,0 +1,9 @@ +import { NgModule } from "@angular/core"; + +import { RiskInsightsRoutingModule } from "./risk-insights-routing.module"; +import { RiskInsightsComponent } from "./risk-insights.component"; + +@NgModule({ + imports: [RiskInsightsComponent, RiskInsightsRoutingModule], +}) +export class RiskInsightsModule {} diff --git a/apps/web/src/locales/en/messages.json b/apps/web/src/locales/en/messages.json index 7e441ae4ba2..05332032e0a 100644 --- a/apps/web/src/locales/en/messages.json +++ b/apps/web/src/locales/en/messages.json @@ -5,8 +5,8 @@ "criticalApplications": { "message": "Critical applications" }, - "accessIntelligence": { - "message": "Access Intelligence" + "riskInsights": { + "message": "Risk Insights" }, "passwordRisk": { "message": "Password Risk" diff --git a/bitwarden_license/bit-common/src/tools/reports/access-intelligence/index.ts b/bitwarden_license/bit-common/src/tools/reports/risk-insights/index.ts similarity index 100% rename from bitwarden_license/bit-common/src/tools/reports/access-intelligence/index.ts rename to bitwarden_license/bit-common/src/tools/reports/risk-insights/index.ts diff --git a/bitwarden_license/bit-common/src/tools/reports/access-intelligence/response/member-cipher-details.response.ts b/bitwarden_license/bit-common/src/tools/reports/risk-insights/response/member-cipher-details.response.ts similarity index 100% rename from bitwarden_license/bit-common/src/tools/reports/access-intelligence/response/member-cipher-details.response.ts rename to bitwarden_license/bit-common/src/tools/reports/risk-insights/response/member-cipher-details.response.ts diff --git a/bitwarden_license/bit-common/src/tools/reports/access-intelligence/services/ciphers.mock.ts b/bitwarden_license/bit-common/src/tools/reports/risk-insights/services/ciphers.mock.ts similarity index 100% rename from bitwarden_license/bit-common/src/tools/reports/access-intelligence/services/ciphers.mock.ts rename to bitwarden_license/bit-common/src/tools/reports/risk-insights/services/ciphers.mock.ts diff --git a/bitwarden_license/bit-common/src/tools/reports/access-intelligence/services/index.ts b/bitwarden_license/bit-common/src/tools/reports/risk-insights/services/index.ts similarity index 100% rename from bitwarden_license/bit-common/src/tools/reports/access-intelligence/services/index.ts rename to bitwarden_license/bit-common/src/tools/reports/risk-insights/services/index.ts diff --git a/bitwarden_license/bit-common/src/tools/reports/access-intelligence/services/member-cipher-details-api.service.spec.ts b/bitwarden_license/bit-common/src/tools/reports/risk-insights/services/member-cipher-details-api.service.spec.ts similarity index 100% rename from bitwarden_license/bit-common/src/tools/reports/access-intelligence/services/member-cipher-details-api.service.spec.ts rename to bitwarden_license/bit-common/src/tools/reports/risk-insights/services/member-cipher-details-api.service.spec.ts diff --git a/bitwarden_license/bit-common/src/tools/reports/access-intelligence/services/member-cipher-details-api.service.ts b/bitwarden_license/bit-common/src/tools/reports/risk-insights/services/member-cipher-details-api.service.ts similarity index 100% rename from bitwarden_license/bit-common/src/tools/reports/access-intelligence/services/member-cipher-details-api.service.ts rename to bitwarden_license/bit-common/src/tools/reports/risk-insights/services/member-cipher-details-api.service.ts diff --git a/bitwarden_license/bit-common/src/tools/reports/access-intelligence/services/member-cipher-details-response.mock.ts b/bitwarden_license/bit-common/src/tools/reports/risk-insights/services/member-cipher-details-response.mock.ts similarity index 100% rename from bitwarden_license/bit-common/src/tools/reports/access-intelligence/services/member-cipher-details-response.mock.ts rename to bitwarden_license/bit-common/src/tools/reports/risk-insights/services/member-cipher-details-response.mock.ts diff --git a/bitwarden_license/bit-common/src/tools/reports/access-intelligence/services/password-health.service.spec.ts b/bitwarden_license/bit-common/src/tools/reports/risk-insights/services/password-health.service.spec.ts similarity index 100% rename from bitwarden_license/bit-common/src/tools/reports/access-intelligence/services/password-health.service.spec.ts rename to bitwarden_license/bit-common/src/tools/reports/risk-insights/services/password-health.service.spec.ts diff --git a/bitwarden_license/bit-common/src/tools/reports/access-intelligence/services/password-health.service.ts b/bitwarden_license/bit-common/src/tools/reports/risk-insights/services/password-health.service.ts similarity index 97% rename from bitwarden_license/bit-common/src/tools/reports/access-intelligence/services/password-health.service.ts rename to bitwarden_license/bit-common/src/tools/reports/risk-insights/services/password-health.service.ts index 0eaed89b71f..1709261922b 100644 --- a/bitwarden_license/bit-common/src/tools/reports/access-intelligence/services/password-health.service.ts +++ b/bitwarden_license/bit-common/src/tools/reports/risk-insights/services/password-health.service.ts @@ -1,9 +1,9 @@ import { Inject, Injectable } from "@angular/core"; // eslint-disable-next-line no-restricted-imports -import { mockCiphers } from "@bitwarden/bit-common/tools/reports/access-intelligence/services/ciphers.mock"; +import { mockCiphers } from "@bitwarden/bit-common/tools/reports/risk-insights/services/ciphers.mock"; // eslint-disable-next-line no-restricted-imports -import { mockMemberCipherDetailsResponse } from "@bitwarden/bit-common/tools/reports/access-intelligence/services/member-cipher-details-response.mock"; +import { mockMemberCipherDetailsResponse } from "@bitwarden/bit-common/tools/reports/risk-insights/services/member-cipher-details-response.mock"; import { AuditService } from "@bitwarden/common/abstractions/audit.service"; import { Utils } from "@bitwarden/common/platform/misc/utils"; import { PasswordStrengthServiceAbstraction } from "@bitwarden/common/tools/password-strength"; From f33661c31c58700bf45178ab5239c9eda3b6125e Mon Sep 17 00:00:00 2001 From: cyprain-okeke <108260115+cyprain-okeke@users.noreply.github.com> Date: Wed, 6 Nov 2024 16:05:22 +0100 Subject: [PATCH 8/9] [PM-11505]Delete the feature flag PM-5864-dollar-threshold (#11436) * remove the time threshold flag * Remove the time threshold flag --- .../user-subscription.component.html | 11 +---------- .../individual/user-subscription.component.ts | 5 ----- ...nization-subscription-cloud.component.html | 5 +---- ...ganization-subscription-cloud.component.ts | 19 ------------------- libs/common/src/enums/feature-flag.enum.ts | 2 -- 5 files changed, 2 insertions(+), 40 deletions(-) diff --git a/apps/web/src/app/billing/individual/user-subscription.component.html b/apps/web/src/app/billing/individual/user-subscription.component.html index eeb64ffe77d..1c1382cd816 100644 --- a/apps/web/src/app/billing/individual/user-subscription.component.html +++ b/apps/web/src/app/billing/individual/user-subscription.component.html @@ -48,16 +48,7 @@ }}
{{ "nextCharge" | i18n }}
-
- {{ - nextInvoice - ? (nextInvoice.date | date: "mediumDate") + - ", " + - (nextInvoice.amount | currency: "$") - : "-" - }} -
-
+
{{ nextInvoice ? (sub.subscription.periodEndDate | date: "mediumDate") + diff --git a/apps/web/src/app/billing/individual/user-subscription.component.ts b/apps/web/src/app/billing/individual/user-subscription.component.ts index e04b7c8b019..942767946ba 100644 --- a/apps/web/src/app/billing/individual/user-subscription.component.ts +++ b/apps/web/src/app/billing/individual/user-subscription.component.ts @@ -38,13 +38,9 @@ export class UserSubscriptionComponent implements OnInit { sub: SubscriptionResponse; selfHosted = false; cloudWebVaultUrl: string; - enableTimeThreshold: boolean; cancelPromise: Promise; reinstatePromise: Promise; - protected enableTimeThreshold$ = this.configService.getFeatureFlag$( - FeatureFlag.EnableTimeThreshold, - ); protected deprecateStripeSourcesAPI$ = this.configService.getFeatureFlag$( FeatureFlag.AC2476_DeprecateStripeSourcesAPI, @@ -69,7 +65,6 @@ export class UserSubscriptionComponent implements OnInit { async ngOnInit() { this.cloudWebVaultUrl = await firstValueFrom(this.environmentService.cloudWebVaultUrl$); await this.load(); - this.enableTimeThreshold = await firstValueFrom(this.enableTimeThreshold$); this.firstLoaded = true; } diff --git a/apps/web/src/app/billing/organizations/organization-subscription-cloud.component.html b/apps/web/src/app/billing/organizations/organization-subscription-cloud.component.html index cd95e887040..0cd21d0f688 100644 --- a/apps/web/src/app/billing/organizations/organization-subscription-cloud.component.html +++ b/apps/web/src/app/billing/organizations/organization-subscription-cloud.component.html @@ -48,10 +48,7 @@
{{ "subscriptionExpiration" | i18n }}
-
- {{ nextInvoice ? (nextInvoice.date | date: "mediumDate") : "-" }} -
-
+
{{ nextInvoice ? (sub.subscription.periodEndDate | date: "mediumDate") : "-" }}
diff --git a/apps/web/src/app/billing/organizations/organization-subscription-cloud.component.ts b/apps/web/src/app/billing/organizations/organization-subscription-cloud.component.ts index 1000084df9e..d4d11d91e01 100644 --- a/apps/web/src/app/billing/organizations/organization-subscription-cloud.component.ts +++ b/apps/web/src/app/billing/organizations/organization-subscription-cloud.component.ts @@ -52,7 +52,6 @@ export class OrganizationSubscriptionCloudComponent implements OnInit, OnDestroy loading = true; locale: string; showUpdatedSubscriptionStatusSection$: Observable; - enableTimeThreshold: boolean; preSelectedProductTier: ProductTierType = ProductTierType.Free; showSubscription = true; showSelfHost = false; @@ -65,10 +64,6 @@ export class OrganizationSubscriptionCloudComponent implements OnInit, OnDestroy FeatureFlag.EnableConsolidatedBilling, ); - protected enableTimeThreshold$ = this.configService.getFeatureFlag$( - FeatureFlag.EnableTimeThreshold, - ); - protected enableUpgradePasswordManagerSub$ = this.configService.getFeatureFlag$( FeatureFlag.EnableUpgradePasswordManagerSub, ); @@ -117,7 +112,6 @@ export class OrganizationSubscriptionCloudComponent implements OnInit, OnDestroy this.showUpdatedSubscriptionStatusSection$ = this.configService.getFeatureFlag$( FeatureFlag.AC1795_UpdatedSubscriptionStatusSection, ); - this.enableTimeThreshold = await firstValueFrom(this.enableTimeThreshold$); } ngOnDestroy() { @@ -298,9 +292,6 @@ export class OrganizationSubscriptionCloudComponent implements OnInit, OnDestroy return this.i18nService.t("subscriptionUpgrade", this.sub.seats.toString()); } } else if (this.sub.maxAutoscaleSeats === this.sub.seats && this.sub.seats != null) { - if (!this.enableTimeThreshold) { - return this.i18nService.t("subscriptionMaxReached", this.sub.seats.toString()); - } const seatAdjustmentMessage = this.sub.plan.isAnnual ? "annualSubscriptionUserSeatsMessage" : "monthlySubscriptionUserSeatsMessage"; @@ -311,21 +302,11 @@ export class OrganizationSubscriptionCloudComponent implements OnInit, OnDestroy } else if (this.userOrg.productTierType === ProductTierType.TeamsStarter) { return this.i18nService.t("subscriptionUserSeatsWithoutAdditionalSeatsOption", 10); } else if (this.sub.maxAutoscaleSeats == null) { - if (!this.enableTimeThreshold) { - return this.i18nService.t("subscriptionUserSeatsUnlimitedAutoscale"); - } - const seatAdjustmentMessage = this.sub.plan.isAnnual ? "annualSubscriptionUserSeatsMessage" : "monthlySubscriptionUserSeatsMessage"; return this.i18nService.t(seatAdjustmentMessage); } else { - if (!this.enableTimeThreshold) { - return this.i18nService.t( - "subscriptionUserSeatsLimitedAutoscale", - this.sub.maxAutoscaleSeats.toString(), - ); - } const seatAdjustmentMessage = this.sub.plan.isAnnual ? "annualSubscriptionUserSeatsMessage" : "monthlySubscriptionUserSeatsMessage"; diff --git a/libs/common/src/enums/feature-flag.enum.ts b/libs/common/src/enums/feature-flag.enum.ts index 84cf5ed521e..ea016e34350 100644 --- a/libs/common/src/enums/feature-flag.enum.ts +++ b/libs/common/src/enums/feature-flag.enum.ts @@ -17,7 +17,6 @@ export enum FeatureFlag { InlineMenuFieldQualification = "inline-menu-field-qualification", MemberAccessReport = "ac-2059-member-access-report", TwoFactorComponentRefactor = "two-factor-component-refactor", - EnableTimeThreshold = "PM-5864-dollar-threshold", InlineMenuPositioningImprovements = "inline-menu-positioning-improvements", ProviderClientVaultPrivacyBanner = "ac-2833-provider-client-vault-privacy-banner", VaultBulkManagementAction = "vault-bulk-management-action", @@ -63,7 +62,6 @@ export const DefaultFeatureFlagValue = { [FeatureFlag.InlineMenuFieldQualification]: FALSE, [FeatureFlag.MemberAccessReport]: FALSE, [FeatureFlag.TwoFactorComponentRefactor]: FALSE, - [FeatureFlag.EnableTimeThreshold]: FALSE, [FeatureFlag.InlineMenuPositioningImprovements]: FALSE, [FeatureFlag.ProviderClientVaultPrivacyBanner]: FALSE, [FeatureFlag.VaultBulkManagementAction]: FALSE, From d5139e0511ab9a88e555515f0bcb1297eaec1a96 Mon Sep 17 00:00:00 2001 From: Nick Krantz <125900171+nick-livefront@users.noreply.github.com> Date: Wed, 6 Nov 2024 09:42:53 -0600 Subject: [PATCH 9/9] change totp code to monospace font (#11844) --- .../login-credentials/login-credentials-view.component.html | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/vault/src/cipher-view/login-credentials/login-credentials-view.component.html b/libs/vault/src/cipher-view/login-credentials/login-credentials-view.component.html index 0bee6d30eb8..afc38a58d65 100644 --- a/libs/vault/src/cipher-view/login-credentials/login-credentials-view.component.html +++ b/libs/vault/src/cipher-view/login-credentials/login-credentials-view.component.html @@ -111,6 +111,7 @@ [value]="totpCodeCopyObj?.totpCodeFormatted || '*** ***'" aria-readonly="true" data-testid="login-totp" + class="tw-font-mono" />