1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-29 12:55:21 +01:00

[PM-2928] [PM-2929] [PM-2930] Fixes for: [PM-1203] Replace MP confirmation with verification code (#5798)

* [PM-2928] feat: hide change email if user doen't have MP

* [PM-2929] feat: hide KDF settings if user doesn't have MP

* [PM-2930] feat: remove MP copy
This commit is contained in:
Andreas Coroiu 2023-07-13 09:34:43 +02:00 committed by GitHub
parent 5480e47bb6
commit 2f1358cf04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 11 deletions

View File

@ -1,6 +1,5 @@
<form #form (ngSubmit)="submit()" [appApiAction]="formPromise" ngNativeValidate>
<div class="modal-body">
<p>{{ "twoStepLoginAuthDesc" | i18n }}</p>
<app-user-verification [(ngModel)]="secret" ngDefaultControl name="secret">
</app-user-verification>
</div>

View File

@ -1,9 +1,7 @@
import { Component, ViewChild, ViewContainerRef } from "@angular/core";
import { ModalService } from "@bitwarden/angular/services/modal.service";
import { ApiService } from "@bitwarden/common/abstractions/api.service";
import { KeyConnectorService } from "@bitwarden/common/auth/abstractions/key-connector.service";
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
import { UserVerificationService } from "@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction";
import { DeauthorizeSessionsComponent } from "../auth/settings/deauthorize-sessions.component";
@ -26,13 +24,11 @@ export class AccountComponent {
constructor(
private modalService: ModalService,
private apiService: ApiService,
private keyConnectorService: KeyConnectorService,
private stateService: StateService
private userVerificationService: UserVerificationService
) {}
async ngOnInit() {
this.showChangeEmail = !(await this.keyConnectorService.getUsesKeyConnector());
this.showChangeEmail = await this.userVerificationService.hasMasterPassword();
}
async deauthorizeSessions() {

View File

@ -2,7 +2,7 @@ import { Component, OnInit, ViewChild, ViewContainerRef } from "@angular/core";
import { ModalService } from "@bitwarden/angular/services/modal.service";
import { ApiService } from "@bitwarden/common/abstractions/api.service";
import { KeyConnectorService } from "@bitwarden/common/auth/abstractions/key-connector.service";
import { UserVerificationService } from "@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction";
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
import { ApiKeyComponent } from "./api-key.component";
@ -20,14 +20,14 @@ export class SecurityKeysComponent implements OnInit {
showChangeKdf = true;
constructor(
private keyConnectorService: KeyConnectorService,
private userVerificationService: UserVerificationService,
private stateService: StateService,
private modalService: ModalService,
private apiService: ApiService
) {}
async ngOnInit() {
this.showChangeKdf = !(await this.keyConnectorService.getUsesKeyConnector());
this.showChangeKdf = await this.userVerificationService.hasMasterPassword();
}
async viewUserApiKey() {