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