diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2016-06-09 17:17:01 +0200 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2016-06-10 13:19:43 +0200 |
commit | beed70c0248fea13bdf727e5f14dee362b0cd298 (patch) | |
tree | 06a8fca1cf4dfcbd60b3dedfd96dda4adf778943 /app/controllers/application_controller.rb | |
parent | d74a8900e27a98f1c921052d2fc44f38cc63a2ea (diff) | |
download | gitlab-ce-feature-flags.tar.gz |
Use feature flags for notes and award emojisfeature-flags
This allows us to disable creating/updating/removing of notes as well as
toggling of award emojis.
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r-- | app/controllers/application_controller.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 62f63701799..713d552976c 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -366,6 +366,14 @@ class ApplicationController < ActionController::Base request.base_url end + def require_feature!(feature) + if Gitlab::Feature.feature_enabled?(feature) + yield + else + head(:service_unavailable) + end + end + private def set_default_sort |