From eadb1fa4efda44ec1e28cd105212a8e20bb13afe Mon Sep 17 00:00:00 2001 From: SmithThe4th Date: Thu, 20 Jun 2024 10:59:11 -0400 Subject: [PATCH] [PM-7215] User with Can View permission can remove passkey or delete URIs from UI, though it isn't saved (#9607) * Removed - button on passkeys and uris when user has view only access, disabled cog button and made input fields on uris readonly when user has view only access (cherry picked from commit 077edd77c1d1a275a607faff1b6cab8e9c9fc3d7) * switched to use viewonly to hide remove button (cherry picked from commit dbd854494feb536713f05d614a7af739ec5dfc98) --- .../vault/popup/components/vault/add-edit.component.html | 4 ++++ apps/desktop/src/vault/app/vault/add-edit.component.html | 6 ++++-- .../src/app/vault/individual-vault/add-edit.component.ts | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/apps/browser/src/vault/popup/components/vault/add-edit.component.html b/apps/browser/src/vault/popup/components/vault/add-edit.component.html index 8ff448b6f7..9ddae87877 100644 --- a/apps/browser/src/vault/popup/components/vault/add-edit.component.html +++ b/apps/browser/src/vault/popup/components/vault/add-edit.component.html @@ -144,6 +144,7 @@ appStopClick (click)="removePasskey()" appA11yTitle="{{ 'removePasskey' | i18n }}" + *ngIf="!(!cipher.edit && editMode)" > @@ -542,6 +543,7 @@ > diff --git a/apps/desktop/src/vault/app/vault/add-edit.component.html b/apps/desktop/src/vault/app/vault/add-edit.component.html index ea7be92935..faddd1210e 100644 --- a/apps/desktop/src/vault/app/vault/add-edit.component.html +++ b/apps/desktop/src/vault/app/vault/add-edit.component.html @@ -127,7 +127,7 @@ appStopClick (click)="removePasskey()" appA11yTitle="{{ 'removePasskey' | i18n }}" - [disabled]="!cipher.edit && editMode" + *ngIf="!(!cipher.edit && editMode)" > @@ -488,7 +488,7 @@ appStopClick (click)="removeUri(u)" appA11yTitle="{{ 'remove' | i18n }}" - [disabled]="!cipher.edit && editMode" + *ngIf="!(!cipher.edit && editMode)" > @@ -500,6 +500,7 @@ name="Login.Uris[{{ i }}].Uri" [(ngModel)]="u.uri" placeholder="{{ 'ex' | i18n }} https://google.com" + [readonly]="!cipher.edit && editMode" appInputVerbatim />