Commit 95f2bef8 authored by Kamil Trzciński's avatar Kamil Trzciński

Update `development.md` with `licensed`

This improves documentation around
`licensed` feature flags.
parent d20f5a03
......@@ -65,20 +65,24 @@ push_frontend_feature_flag(:my_ops_flag, project, type: :ops)
`licensed` feature flags are used to temporarily disable licensed features. There
should be a one-to-one mapping of `licensed` feature flags to licensed features.
`licensed` feature flags likely do not have rollout issues.
`licensed` feature flags must be `default_enabled: true`, because that's the only
supported option in the current implementation. This is under development as per
the [related issue](https://gitlab.com/gitlab-org/gitlab/-/issues/218667.
The `licensed` type has a dedicated set of functions to check if a licensed feature
is available for a project or namespace. This check validates if the license is assigned
to the namespace and feature flag itself:
The `licensed` type has a dedicated set of functions to check if a licensed
feature is available for a project or namespace. This check validates
if the license is assigned to the namespace and feature flag itself.
The `licensed` feature flag has the same name as a licensed feature name:
```ruby
# Check if feature flag is enabled
# Good: checks if feature flag is enabled
project.feature_available?(:my_licensed_feature)
namespace.feature_available?(:my_licensed_feature)
# Bad: licensed flag must be accessed via `feature_available?`
Feature.enabled?(:my_licensed_feature, type: :licensed)
push_frontend_feature_flag(:my_licensed_feature, type: :licensed)
```
## Feature flag definition and validation
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment