From 2f3e37d71340cce7ec57815e3eb18c7064f7373c Mon Sep 17 00:00:00 2001 From: Vincent Salucci <26154748+vincentsalucci@users.noreply.github.com> Date: Tue, 2 Apr 2024 14:58:54 -0500 Subject: [PATCH 1/5] [SM-889] FIX - bulk activate SM members (#8375) * fix: add accessSecretsManager property and filter checked users, refs SM-889 * fix: load members list on bulk sm complete, refs SM-889 --- .../organizations/core/views/organization-user.view.ts | 4 ++++ .../admin-console/organizations/members/people.component.ts | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) 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 ee263ec750e..947ae9b13eb 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 @@ -26,6 +26,10 @@ export class OrganizationUserView { twoFactorEnabled: boolean; usesKeyConnector: boolean; hasMasterPassword: boolean; + /** + * True if this organizaztion user has been granted access to Secrets Manager, false otherwise. + */ + accessSecretsManager: boolean; collections: CollectionAccessSelectionView[] = []; groups: string[] = []; diff --git a/apps/web/src/app/admin-console/organizations/members/people.component.ts b/apps/web/src/app/admin-console/organizations/members/people.component.ts index b2aedacc800..8a303ddfe54 100644 --- a/apps/web/src/app/admin-console/organizations/members/people.component.ts +++ b/apps/web/src/app/admin-console/organizations/members/people.component.ts @@ -571,7 +571,8 @@ export class PeopleComponent } async bulkEnableSM() { - const users = this.getCheckedUsers(); + const users = this.getCheckedUsers().filter((ou) => !ou.accessSecretsManager); + if (users.length === 0) { this.platformUtilsService.showToast( "error", @@ -588,6 +589,7 @@ export class PeopleComponent await lastValueFrom(dialogRef.closed); this.selectAll(false); + await this.load(); } async events(user: OrganizationUserView) { From 165f9c460a74caa94c5f5f984c15159439bb8326 Mon Sep 17 00:00:00 2001 From: Will Martin Date: Tue, 2 Apr 2024 16:00:08 -0400 Subject: [PATCH 2/5] remove unused OrganizationBillingTabComponent (#8435) Co-authored-by: cyprain-okeke <108260115+cyprain-okeke@users.noreply.github.com> --- .../organization-billing-tab.component.ts | 31 ------------------- 1 file changed, 31 deletions(-) delete mode 100644 apps/web/src/app/billing/organizations/organization-billing-tab.component.ts diff --git a/apps/web/src/app/billing/organizations/organization-billing-tab.component.ts b/apps/web/src/app/billing/organizations/organization-billing-tab.component.ts deleted file mode 100644 index 25d4ea48924..00000000000 --- a/apps/web/src/app/billing/organizations/organization-billing-tab.component.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Component, OnInit } from "@angular/core"; -import { ActivatedRoute } from "@angular/router"; -import { map, Observable, switchMap } from "rxjs"; - -import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; -import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; - -@Component({ - templateUrl: "organization-billing-tab.component.html", -}) -export class OrganizationBillingTabComponent implements OnInit { - showPaymentAndHistory$: Observable; - - constructor( - private route: ActivatedRoute, - private organizationService: OrganizationService, - private platformUtilsService: PlatformUtilsService, - ) {} - - ngOnInit() { - this.showPaymentAndHistory$ = this.route.params.pipe( - switchMap((params) => this.organizationService.get$(params.organizationId)), - map( - (org) => - !this.platformUtilsService.isSelfHost() && - org.canViewBillingHistory && - org.canEditPaymentMethods, - ), - ); - } -} From a4475e82324b3ffb13fe1e3571686417753ea686 Mon Sep 17 00:00:00 2001 From: Oscar Hinton Date: Tue, 2 Apr 2024 22:31:12 +0200 Subject: [PATCH 3/5] [PM-6418] Fix environment selector on desktop (#8046) Fix environment selector being broken on desktop. When selecting self-hosted and filling in a url, the selector fails to update when returning and instead produces the following console error. --- .../desktop/src/auth/login/login.component.ts | 3 - .../environment-selector.component.html | 134 +++++++++--------- .../environment-selector.component.ts | 8 +- 3 files changed, 71 insertions(+), 74 deletions(-) diff --git a/apps/desktop/src/auth/login/login.component.ts b/apps/desktop/src/auth/login/login.component.ts index eb7b9243624..a810a29a26c 100644 --- a/apps/desktop/src/auth/login/login.component.ts +++ b/apps/desktop/src/auth/login/login.component.ts @@ -3,7 +3,6 @@ import { FormBuilder } from "@angular/forms"; import { ActivatedRoute, Router } from "@angular/router"; import { Subject, takeUntil } from "rxjs"; -import { EnvironmentSelectorComponent } from "@bitwarden/angular/auth/components/environment-selector.component"; import { LoginComponent as BaseLoginComponent } from "@bitwarden/angular/auth/components/login.component"; import { FormValidationErrorsService } from "@bitwarden/angular/platform/abstractions/form-validation-errors.service"; import { ModalService } from "@bitwarden/angular/services/modal.service"; @@ -37,8 +36,6 @@ const BroadcasterSubscriptionId = "LoginComponent"; export class LoginComponent extends BaseLoginComponent implements OnDestroy { @ViewChild("environment", { read: ViewContainerRef, static: true }) environmentModal: ViewContainerRef; - @ViewChild("environmentSelector", { read: ViewContainerRef, static: true }) - environmentSelector: EnvironmentSelectorComponent; protected componentDestroyed$: Subject = new Subject(); webVaultHostname = ""; diff --git a/libs/angular/src/auth/components/environment-selector.component.html b/libs/angular/src/auth/components/environment-selector.component.html index 8ad06023853..a8dab8f1213 100644 --- a/libs/angular/src/auth/components/environment-selector.component.html +++ b/libs/angular/src/auth/components/environment-selector.component.html @@ -1,79 +1,81 @@ -
- {{ "loggingInOn" | i18n }}: - -
- - -
- + + +
+
-
-
+ + diff --git a/libs/angular/src/auth/components/environment-selector.component.ts b/libs/angular/src/auth/components/environment-selector.component.ts index 838667e0808..9e811d02af5 100644 --- a/libs/angular/src/auth/components/environment-selector.component.ts +++ b/libs/angular/src/auth/components/environment-selector.component.ts @@ -36,11 +36,9 @@ import { }) export class EnvironmentSelectorComponent { @Output() onOpenSelfHostedSettings = new EventEmitter(); - isOpen = false; - showingModal = false; - selectedEnvironment: Region; - ServerEnvironmentType = Region; - overlayPosition: ConnectedPosition[] = [ + protected isOpen = false; + protected ServerEnvironmentType = Region; + protected overlayPosition: ConnectedPosition[] = [ { originX: "start", originY: "bottom", From 7ea717aa5dd921b56c4c5e8e82c8ff89605d19a8 Mon Sep 17 00:00:00 2001 From: Ariful Alam Date: Wed, 3 Apr 2024 02:35:23 +0600 Subject: [PATCH 4/5] Use `nullValidator` to accept No folder while moving (#5645) Co-authored-by: Daniel James Smith <2670567+djsmith85@users.noreply.github.com> --- .../bulk-move-dialog/bulk-move-dialog.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/src/app/vault/individual-vault/bulk-action-dialogs/bulk-move-dialog/bulk-move-dialog.component.ts b/apps/web/src/app/vault/individual-vault/bulk-action-dialogs/bulk-move-dialog/bulk-move-dialog.component.ts index 09522beadc1..cdf45d0669c 100644 --- a/apps/web/src/app/vault/individual-vault/bulk-action-dialogs/bulk-move-dialog/bulk-move-dialog.component.ts +++ b/apps/web/src/app/vault/individual-vault/bulk-action-dialogs/bulk-move-dialog/bulk-move-dialog.component.ts @@ -41,7 +41,7 @@ export class BulkMoveDialogComponent implements OnInit { cipherIds: string[] = []; formGroup = this.formBuilder.group({ - folderId: ["", [Validators.required]], + folderId: ["", [Validators.nullValidator]], }); folders$: Observable; From f87286b1dff10ee142503d3ca6c3bd9bede86071 Mon Sep 17 00:00:00 2001 From: Cesar Gonzalez Date: Tue, 2 Apr 2024 15:41:59 -0500 Subject: [PATCH 5/5] [PM-2871] Submenu UI elements cannot be accessed by keyboard navigation when screen reader is active (#8357) * [PM-2871] Submenu UI elements cannot be navigated through keyboard when screen reader is active * [PM-2871] Adding an aria-hidden value to menu divider elements --- libs/components/src/menu/menu-divider.component.html | 1 + libs/components/src/menu/menu-trigger-for.directive.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/libs/components/src/menu/menu-divider.component.html b/libs/components/src/menu/menu-divider.component.html index c7c2c739d21..98048261cff 100644 --- a/libs/components/src/menu/menu-divider.component.html +++ b/libs/components/src/menu/menu-divider.component.html @@ -1,4 +1,5 @@ diff --git a/libs/components/src/menu/menu-trigger-for.directive.ts b/libs/components/src/menu/menu-trigger-for.directive.ts index 20ae0b1ce75..7e392f241f0 100644 --- a/libs/components/src/menu/menu-trigger-for.directive.ts +++ b/libs/components/src/menu/menu-trigger-for.directive.ts @@ -88,6 +88,7 @@ export class MenuTriggerForDirective implements OnDestroy { } this.destroyMenu(); }); + this.menu.keyManager.setFirstItemActive(); this.keyDownEventsSub = this.menu.keyManager && this.overlayRef