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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user