1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-19 01:33:33 +00:00

Merge branch 'main' into autofill/pm-5189-fix-issues-present-with-inline-menu-rendering-in-iframes

This commit is contained in:
Cesar Gonzalez
2024-04-02 16:18:16 -05:00
committed by GitHub
9 changed files with 81 additions and 107 deletions

View File

@@ -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<void> = new Subject();
webVaultHostname = "";

View File

@@ -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[] = [];

View File

@@ -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) {

View File

@@ -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<boolean>;
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,
),
);
}
}

View File

@@ -41,7 +41,7 @@ export class BulkMoveDialogComponent implements OnInit {
cipherIds: string[] = [];
formGroup = this.formBuilder.group({
folderId: ["", [Validators.required]],
folderId: ["", [Validators.nullValidator]],
});
folders$: Observable<FolderView[]>;