mirror of
https://github.com/bitwarden/browser
synced 2026-02-11 05:53:42 +00:00
Revert "[PM-13938] Changes to disabled user from seeing password that they sh…"
This reverts commit cc7defc447.
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
bitSuffix
|
||||
bitPasswordInputToggle
|
||||
data-testid="visibility-for-custom-hidden-field"
|
||||
*ngIf="canViewPasswords(i)"
|
||||
[disabled]="!canViewPasswords(i)"
|
||||
(toggledChange)="logHiddenEvent($event)"
|
||||
></button>
|
||||
</bit-form-field>
|
||||
|
||||
@@ -113,7 +113,7 @@ describe("CustomFieldsComponent", () => {
|
||||
]);
|
||||
});
|
||||
|
||||
it("when `viewPassword` is false the user cannot see the view toggle option", () => {
|
||||
it("forbids a user to view hidden fields when the cipher `viewPassword` is false", () => {
|
||||
originalCipherView.viewPassword = false;
|
||||
originalCipherView.fields = mockFieldViews;
|
||||
|
||||
@@ -123,20 +123,7 @@ describe("CustomFieldsComponent", () => {
|
||||
|
||||
const button = fixture.debugElement.query(By.directive(BitPasswordInputToggleDirective));
|
||||
|
||||
expect(button).toBeFalsy();
|
||||
});
|
||||
|
||||
it("when `viewPassword` is true the user can see the view toggle option", () => {
|
||||
originalCipherView.viewPassword = true;
|
||||
originalCipherView.fields = mockFieldViews;
|
||||
|
||||
component.ngOnInit();
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
const button = fixture.debugElement.query(By.directive(BitPasswordInputToggleDirective));
|
||||
|
||||
expect(button).toBeTruthy();
|
||||
expect(button.nativeElement.disabled).toBe(true);
|
||||
});
|
||||
|
||||
describe("linkedFieldOptions", () => {
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
<button
|
||||
bitSuffix
|
||||
type="button"
|
||||
*ngIf="this.cipher.viewPassword"
|
||||
bitIconButton
|
||||
bitPasswordInputToggle
|
||||
*ngIf="canViewPassword"
|
||||
@@ -45,7 +44,6 @@
|
||||
<button
|
||||
bitIconButton="bwi-clone"
|
||||
bitSuffix
|
||||
*ngIf="this.cipher.viewPassword"
|
||||
type="button"
|
||||
[appCopyClick]="field.value"
|
||||
showToast
|
||||
|
||||
Reference in New Issue
Block a user