summaryrefslogtreecommitdiff
path: root/lib/feature.rb
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-06-30 17:34:06 +0200
committerRémy Coutable <remy@rymai.me>2017-07-06 11:18:25 +0200
commit19b8d8af2c74e0ff241356d5ccb5890baa6fb7c8 (patch)
treeda51ca7dcc7e8340627390c714aed36bfc35835c /lib/feature.rb
parentc8ce1f0d5d5908351fd8a0e60c00e67c1be25ed9 (diff)
downloadgitlab-ce-19b8d8af2c74e0ff241356d5ccb5890baa6fb7c8.tar.gz
Hide 'peek' by using 'performance bar' instead
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'lib/feature.rb')
-rw-r--r--lib/feature.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/feature.rb b/lib/feature.rb
index 853a00c75a4..5470c2802d5 100644
--- a/lib/feature.rb
+++ b/lib/feature.rb
@@ -54,15 +54,13 @@ class Feature
adapter = Flipper::Adapters::ActiveRecord.new(
feature_class: FlipperFeature, gate_class: FlipperGate)
- Flipper.new(adapter).tap do
- register_feature_groups
- end
+ Flipper.new(adapter)
end
end
def register_feature_groups
Flipper.register(:performance_team) do |actor|
- Gitlab::PerformanceBar.allowed_actor?(actor)
+ actor.thing&.is_a?(User) && Gitlab::PerformanceBar.allowed_user?(actor.thing)
end
end
end