2022-04-20 10:46:20 +02:00
|
|
|
import { auth } from "../stores/portal"
|
|
|
|
import { get } from "svelte/store"
|
|
|
|
|
|
|
|
export const FEATURE_FLAGS = {
|
|
|
|
LICENSING: "LICENSING",
|
2022-07-29 14:22:59 +02:00
|
|
|
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
|
|
|
|
}
|