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/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) { 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, - ), - ); - } -} 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; 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", 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