1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-12 14:23:32 +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

@@ -28,6 +28,7 @@ export class BitFormButtonDirective implements OnDestroy {
private destroy$ = new Subject<void>();
@Input() type: string;
@Input() disabled?: boolean;
constructor(
buttonComponent: ButtonLikeAbstraction,
@@ -44,7 +45,9 @@ export class BitFormButtonDirective implements OnDestroy {
});
submitDirective.disabled$.pipe(takeUntil(this.destroy$)).subscribe((disabled) => {
buttonComponent.disabled = disabled;
if (this.disabled !== false) {
buttonComponent.disabled = disabled;
}
});
}