mirror of
https://github.com/bitwarden/browser
synced 2025-12-19 09:43:23 +00:00
[AC-1139] Fixed CanDelete logic
This commit is contained in:
@@ -316,6 +316,14 @@ export class CollectionDialogComponent implements OnInit, OnDestroy {
|
||||
this.close(CollectionDialogAction.Deleted, this.collection);
|
||||
};
|
||||
|
||||
protected canDelete$ = this.flexibleCollectionsEnabled$.pipe(
|
||||
switchMap(async (flexibleCollectionsEnabled) => {
|
||||
return (
|
||||
this.editMode && this.collection?.canDelete(this.organization!, flexibleCollectionsEnabled)
|
||||
);
|
||||
})
|
||||
);
|
||||
|
||||
ngOnDestroy(): void {
|
||||
this.destroy$.next();
|
||||
this.destroy$.complete();
|
||||
|
||||
Reference in New Issue
Block a user