budibase/packages/builder/src/helpers/featureFlags.js

16 lines
326 B
JavaScript
Raw Normal View History

2022-04-20 10:46:20 +02:00
import { auth } from "../stores/portal"
import { get } from "svelte/store"
export const FEATURE_FLAGS = {
LICENSING: "LICENSING",
USER_GROUPS: "USER_GROUPS",
2022-04-20 10:46:20 +02:00
}
export const isEnabled = featureFlag => {
const user = get(auth).user
if (user?.featureFlags?.includes(featureFlag)) {
return true
}
return false
}