1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

[PM-21896] - prevent double reprompt for copy password in desktop cipher form (#14883)

* prevent double reprompt for copy password in desktop cipher form

* adjust name

* fix input name
This commit is contained in:
Jordan Aasen
2025-05-22 10:20:33 -07:00
committed by GitHub
parent 753e7af380
commit 57911f210b
3 changed files with 6 additions and 1 deletions

View File

@@ -15,6 +15,7 @@
*ngIf="cipherId && action === 'view'"
[cipherId]="cipherId"
[collectionId]="activeFilter?.selectedCollectionId"
[masterPasswordAlreadyPrompted]="cipherRepromptId === cipherId"
(onCloneCipher)="cloneCipherWithoutPasswordPrompt($event)"
(onEditCipher)="editCipher($event)"
(onViewCipherPasswordHistory)="viewCipherPasswordHistory($event)"

View File

@@ -3,6 +3,7 @@ import {
ChangeDetectorRef,
Component,
EventEmitter,
Input,
NgZone,
OnChanges,
OnDestroy,
@@ -46,6 +47,7 @@ const BroadcasterSubscriptionId = "ViewComponent";
})
export class ViewComponent extends BaseViewComponent implements OnInit, OnDestroy, OnChanges {
@Output() onViewCipherPasswordHistory = new EventEmitter<CipherView>();
@Input() masterPasswordAlreadyPrompted: boolean = false;
constructor(
cipherService: CipherService,
@@ -120,6 +122,7 @@ export class ViewComponent extends BaseViewComponent implements OnInit, OnDestro
}
});
});
this.passwordReprompted = this.masterPasswordAlreadyPrompted;
}
ngOnDestroy() {
@@ -134,6 +137,7 @@ export class ViewComponent extends BaseViewComponent implements OnInit, OnDestro
});
return;
}
this.passwordReprompted = this.masterPasswordAlreadyPrompted;
}
viewHistory() {

View File

@@ -95,7 +95,7 @@ export class ViewComponent implements OnDestroy, OnInit {
cipherType = CipherType;
private previousCipherId: string;
private passwordReprompted = false;
protected passwordReprompted = false;
/**
* Represents TOTP information including display formatting and timing