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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user