Enable new collection permissions UI

This commit is contained in:
Tom Moor
2024-05-27 09:34:34 -04:00
parent 7858133e71
commit 1f097258f4
5 changed files with 32 additions and 13 deletions

View File

@@ -6,6 +6,11 @@ export enum Feature {
newCollectionSharing = "newCollectionSharing",
}
/** Default values for feature flags */
const FeatureDefaults: Record<Feature, boolean> = {
[Feature.newCollectionSharing]: true,
};
/**
* A simple feature flagging system that stores flags in browser storage.
*/
@@ -23,7 +28,7 @@ export class FeatureFlags {
this.initalized = true;
}
return this.cache.has(flag);
return this.cache.has(flag) ?? FeatureDefaults[flag];
}
public static enable(flag: Feature) {