1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 00:03:56 +00:00

[SM-574] Hide edit/delete when user only has read access (#4941)

* Hide edit/delete when user only has read access

* Wire up read/write for secret response

* Remove variable

* Resolve changes after merge

* SM-671: Fix small bug in sm/SM-574 branch to pass secret instead of secret id on deletion (#5096)

---------

Co-authored-by: Colton Hurst <colton@coltonhurst.com>
This commit is contained in:
Oscar Hinton
2023-03-30 16:51:31 +02:00
committed by GitHub
parent 4cb0d7f0ef
commit 873c35fbd4
9 changed files with 52 additions and 5 deletions

View File

@@ -44,6 +44,7 @@ export class SecretDialogComponent implements OnInit {
projects: ProjectListView[];
private destroy$ = new Subject<void>();
constructor(
public dialogRef: DialogRef,
@Inject(DIALOG_DATA) private data: SecretOperation,
@@ -80,8 +81,12 @@ export class SecretDialogComponent implements OnInit {
notes: secret.note,
project: secret.projects[0]?.id ?? "",
});
this.loading = false;
this.formGroup.enable();
if (secret.write) {
this.formGroup.enable();
}
}
ngOnDestroy(): void {