mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 16:23:44 +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'"
|
*ngIf="cipherId && action === 'view'"
|
||||||
[cipherId]="cipherId"
|
[cipherId]="cipherId"
|
||||||
[collectionId]="activeFilter?.selectedCollectionId"
|
[collectionId]="activeFilter?.selectedCollectionId"
|
||||||
|
[masterPasswordAlreadyPrompted]="cipherRepromptId === cipherId"
|
||||||
(onCloneCipher)="cloneCipherWithoutPasswordPrompt($event)"
|
(onCloneCipher)="cloneCipherWithoutPasswordPrompt($event)"
|
||||||
(onEditCipher)="editCipher($event)"
|
(onEditCipher)="editCipher($event)"
|
||||||
(onViewCipherPasswordHistory)="viewCipherPasswordHistory($event)"
|
(onViewCipherPasswordHistory)="viewCipherPasswordHistory($event)"
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import {
|
|||||||
ChangeDetectorRef,
|
ChangeDetectorRef,
|
||||||
Component,
|
Component,
|
||||||
EventEmitter,
|
EventEmitter,
|
||||||
|
Input,
|
||||||
NgZone,
|
NgZone,
|
||||||
OnChanges,
|
OnChanges,
|
||||||
OnDestroy,
|
OnDestroy,
|
||||||
@@ -46,6 +47,7 @@ const BroadcasterSubscriptionId = "ViewComponent";
|
|||||||
})
|
})
|
||||||
export class ViewComponent extends BaseViewComponent implements OnInit, OnDestroy, OnChanges {
|
export class ViewComponent extends BaseViewComponent implements OnInit, OnDestroy, OnChanges {
|
||||||
@Output() onViewCipherPasswordHistory = new EventEmitter<CipherView>();
|
@Output() onViewCipherPasswordHistory = new EventEmitter<CipherView>();
|
||||||
|
@Input() masterPasswordAlreadyPrompted: boolean = false;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
cipherService: CipherService,
|
cipherService: CipherService,
|
||||||
@@ -120,6 +122,7 @@ export class ViewComponent extends BaseViewComponent implements OnInit, OnDestro
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
this.passwordReprompted = this.masterPasswordAlreadyPrompted;
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnDestroy() {
|
ngOnDestroy() {
|
||||||
@@ -134,6 +137,7 @@ export class ViewComponent extends BaseViewComponent implements OnInit, OnDestro
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
this.passwordReprompted = this.masterPasswordAlreadyPrompted;
|
||||||
}
|
}
|
||||||
|
|
||||||
viewHistory() {
|
viewHistory() {
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ export class ViewComponent implements OnDestroy, OnInit {
|
|||||||
cipherType = CipherType;
|
cipherType = CipherType;
|
||||||
|
|
||||||
private previousCipherId: string;
|
private previousCipherId: string;
|
||||||
private passwordReprompted = false;
|
protected passwordReprompted = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents TOTP information including display formatting and timing
|
* Represents TOTP information including display formatting and timing
|
||||||
|
|||||||
Reference in New Issue
Block a user