1
0
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:
cd-bitwarden
2025-01-21 16:00:31 -05:00
committed by GitHub
parent ef20ca83b6
commit f4792c39e8
3 changed files with 3 additions and 18 deletions

View File

@@ -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>

View File

@@ -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", () => {

View File

@@ -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