Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
95f2bef8
Commit
95f2bef8
authored
Sep 09, 2020
by
Kamil Trzciński
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update `development.md` with `licensed`
This improves documentation around `licensed` feature flags.
parent
d20f5a03
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
doc/development/feature_flags/development.md
doc/development/feature_flags/development.md
+9
-5
No files found.
doc/development/feature_flags/development.md
View file @
95f2bef8
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment