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