Merge pull request #2981 from betagouv/hides-dangerous-features-from-manager

manager: hide dangerous features
This commit is contained in:
Paul Chavard 2018-11-13 16:50:13 +01:00 committed by GitHub
commit 9528f9a690
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 9 deletions

View file

@ -6,9 +6,9 @@
end
%table#features
- Flipflop.feature_set.features.each do |feature|
- if !feature.group || feature.group.key != :production
%tr
%td= feature.title
%td
= check_box_tag "enable-feature", "enable", field.data[feature.name], data: { url: url, key: feature.key }
- admin_features = Flipflop.feature_set.features.reject{ |f| f.group.try(:key) == :production }
- admin_features.each do |feature|
%tr
%td= feature.title
%td
= check_box_tag "enable-feature", "enable", field.data[feature.name], data: { url: url, key: feature.key }

View file

@ -27,8 +27,7 @@ Flipflop.configure do
default: ENV['FOG_ENABLED'] == 'enabled'
feature :weekly_overview,
default: ENV['APP_NAME'] == 'tps'
feature :pre_maintenance_mode
feature :maintenance_mode
end
feature :pre_maintenance_mode
feature :maintenance_mode
end