Feature flagging backend
This commit is contained in:
parent
ed19c9db7e
commit
d4b0ef7d47
|
@ -267,4 +267,5 @@ export class FlagSet<V extends Flag<any>, T extends { [key: string]: V }> {
|
|||
// default values set correctly and their types flow through the system.
|
||||
export const flags = new FlagSet({
|
||||
DEFAULT_VALUES: Flag.boolean(false),
|
||||
ENRICHED_RELATIONSHIPS: Flag.boolean(false),
|
||||
})
|
||||
|
|
|
@ -11,7 +11,7 @@ import { USER_METDATA_PREFIX } from "../utils"
|
|||
import partition from "lodash/partition"
|
||||
import { getGlobalUsersFromMetadata } from "../../utilities/global"
|
||||
import { processFormulas } from "../../utilities/rowProcessor"
|
||||
import { context } from "@budibase/backend-core"
|
||||
import { context, features } from "@budibase/backend-core"
|
||||
import {
|
||||
ContextUser,
|
||||
FieldType,
|
||||
|
@ -272,7 +272,9 @@ export async function squashLinksToPrimaryDisplay(
|
|||
const obj: any = { _id: link._id }
|
||||
obj.primaryDisplay = getPrimaryDisplayValue(link, linkedTable)
|
||||
|
||||
const allowRelationshipSchemas = true // TODO
|
||||
const allowRelationshipSchemas = await features.flags.isEnabled(
|
||||
"ENRICHED_RELATIONSHIPS"
|
||||
)
|
||||
if (schema.schema && allowRelationshipSchemas) {
|
||||
for (const relField of Object.entries(schema.schema)
|
||||
.filter(([_, field]) => field.visible !== false)
|
||||
|
|
Loading…
Reference in New Issue