1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 16:53:34 +00:00

[PM-9631] MP reprompt view items (#10291)

* MP reprompt check will run before viewing item
This commit is contained in:
Jason Ng
2024-07-29 16:08:35 -04:00
committed by GitHub
parent 2eea253dac
commit 3b668deaac
7 changed files with 28 additions and 43 deletions

View File

@@ -18,8 +18,6 @@ import { AttachmentView } from "@bitwarden/common/vault/models/view/attachment.v
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
import { AsyncActionsModule, IconButtonModule, ToastService } from "@bitwarden/components";
import { PasswordRepromptService } from "../../services/password-reprompt.service";
@Component({
standalone: true,
selector: "app-download-attachment",
@@ -39,8 +37,6 @@ export class DownloadAttachmentComponent {
/** The organization key if the cipher is associated with one */
private orgKey: OrgKey | null = null;
private passwordReprompted = false;
constructor(
private i18nService: I18nService,
private apiService: ApiService,
@@ -49,7 +45,6 @@ export class DownloadAttachmentComponent {
private encryptService: EncryptService,
private stateProvider: StateProvider,
private cryptoService: CryptoService,
private passwordRepromptService: PasswordRepromptService,
) {
this.stateProvider.activeUserId$
.pipe(
@@ -65,15 +60,6 @@ export class DownloadAttachmentComponent {
/** Download the attachment */
download = async () => {
if (this.checkPwReprompt) {
this.passwordReprompted =
this.passwordReprompted ||
(await this.passwordRepromptService.passwordRepromptCheck(this.cipher));
if (!this.passwordReprompted) {
return;
}
}
let url: string;
try {