Files
twenty/packages/twenty-docs/l/ru/developers/contribute/capabilities/backend-development/feature-flags.mdx
T
Félix Malfait 3dd858c91e i18n - docs translations (#16774)
Created by Github action

Pulls the latest documentation translations from Crowdin for all
supported languages:
- French (fr)
- Arabic (ar)  
- Czech (cs)
- German (de)
- Spanish (es)
- Italian (it)
- Japanese (ja)
- Korean (ko)
- Portuguese (pt)
- Romanian (ro)
- Russian (ru)
- Turkish (tr)
- Chinese (zh-CN)

---------

Co-authored-by: github-actions <github-actions@twenty.com>
2025-12-23 14:26:11 +01:00

47 lines
1.2 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: Feature Flags
---
Feature flags are used to hide experimental features. Для Twenty они устанавливаются на уровне рабочей области, а не на уровне пользователя.
## Adding a new feature flag
В `FeatureFlagKey.ts` добавьте флаг функции:
```ts
type FeatureFlagKey =
| 'IS_FEATURENAME_ENABLED'
| ...;
```
Также добавьте его в перечисление в `feature-flag.entity.ts`:
```ts
enum FeatureFlagKeys {
IsFeatureNameEnabled = 'IS_FEATURENAME_ENABLED',
...
}
```
To apply a feature flag on a **backend** feature use:
```ts
@Gate({
featureFlag: 'IS_FEATURENAME_ENABLED',
})
```
To apply a feature flag on a **frontend** feature use:
```ts
const isFeatureNameEnabled = useIsFeatureEnabled('IS_FEATURENAME_ENABLED');
```
## Configure feature flags for the deployment
Измените соответствующую запись в таблице `core.featureFlag`:
| идентификатор | ключ | workspaceId | значение |
| ------------- | ------------------------ | ----------- | -------- |
| Случайный | `IS_FEATURENAME_ENABLED` | WorkspaceID | `истина` |