summaryrefslogtreecommitdiff
path: root/doc/development/licensed_feature_availability.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/development/licensed_feature_availability.md')
-rw-r--r--doc/development/licensed_feature_availability.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/development/licensed_feature_availability.md b/doc/development/licensed_feature_availability.md
index a9fc0414297..10e6d717a18 100644
--- a/doc/development/licensed_feature_availability.md
+++ b/doc/development/licensed_feature_availability.md
@@ -41,3 +41,16 @@ the instance license.
```ruby
License.feature_available?(:feature_symbol)
```
+
+## Restricting frontend features
+
+To restrict frontend features based on the license, use `push_licensed_feature`.
+The frontend can then access this via `this.glFeatures`:
+
+```ruby
+before_action do
+ push_licensed_feature(:feature_symbol)
+ # or by project/namespace
+ push_licensed_feature(:feature_symbol, project)
+end
+```