mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 09:13:33 +00:00
[AC-2027] Update Flexible Collections logic to use organization property (#7445)
* Remove unused feature flag * Replace feature flag ref with org flag * Remove deprecated feature flag to discourage use * Add check to org.canCreateNewCollections * Adjust init logic of components to avoid race conditions * Make canCreateNewCollections logic more explicit * Resolve merge conflicts with vault changes * Update comments * Remove uses of old feature flag * Remove last of old feature flag * Clean up feature flag * Fix linting * Fix linting
This commit is contained in:
@@ -69,10 +69,9 @@ export enum CollectionDialogAction {
|
||||
templateUrl: "collection-dialog.component.html",
|
||||
})
|
||||
export class CollectionDialogComponent implements OnInit, OnDestroy {
|
||||
protected flexibleCollectionsEnabled$ = this.configService.getFeatureFlag$(
|
||||
FeatureFlag.FlexibleCollections,
|
||||
false,
|
||||
);
|
||||
protected flexibleCollectionsEnabled$ = this.organizationService
|
||||
.get$(this.params.organizationId)
|
||||
.pipe(map((o) => o?.flexibleCollections));
|
||||
|
||||
protected flexibleCollectionsV1Enabled$ = this.configService.getFeatureFlag$(
|
||||
FeatureFlag.FlexibleCollectionsV1,
|
||||
@@ -110,9 +109,9 @@ export class CollectionDialogComponent implements OnInit, OnDestroy {
|
||||
private i18nService: I18nService,
|
||||
private platformUtilsService: PlatformUtilsService,
|
||||
private organizationUserService: OrganizationUserService,
|
||||
private configService: ConfigServiceAbstraction,
|
||||
private dialogService: DialogService,
|
||||
private changeDetectorRef: ChangeDetectorRef,
|
||||
private configService: ConfigServiceAbstraction,
|
||||
) {
|
||||
this.tabIndex = params.initialTab ?? CollectionDialogTabType.Info;
|
||||
}
|
||||
@@ -209,7 +208,7 @@ export class CollectionDialogComponent implements OnInit, OnDestroy {
|
||||
access: accessSelections,
|
||||
});
|
||||
|
||||
this.showDeleteButton = this.collection.canDelete(organization, flexibleCollections);
|
||||
this.showDeleteButton = this.collection.canDelete(organization);
|
||||
} else {
|
||||
this.nestOptions = collections;
|
||||
const parent = collections.find((c) => c.id === this.params.parentCollectionId);
|
||||
|
||||
Reference in New Issue
Block a user