diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/feature.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/performance_bar.rb | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/feature.rb b/lib/feature.rb index 5470c2802d5..c4e1741df52 100644 --- a/lib/feature.rb +++ b/lib/feature.rb @@ -60,7 +60,9 @@ class Feature def register_feature_groups Flipper.register(:performance_team) do |actor| - actor.thing&.is_a?(User) && Gitlab::PerformanceBar.allowed_user?(actor.thing) + user = actor.thing + + user&.is_a?(User) && Gitlab::PerformanceBar.allowed_user?(user) end end end diff --git a/lib/gitlab/performance_bar.rb b/lib/gitlab/performance_bar.rb index af73cae3c9f..60c8ba5063e 100644 --- a/lib/gitlab/performance_bar.rb +++ b/lib/gitlab/performance_bar.rb @@ -21,10 +21,10 @@ module Gitlab if RequestStore.active? RequestStore.fetch('performance_bar:allowed_group') do - Group.by_path(Gitlab.config.performance_bar.allowed_group) + Group.find_by_full_path(Gitlab.config.performance_bar.allowed_group) end else - Group.by_path(Gitlab.config.performance_bar.allowed_group) + Group.find_by_full_path(Gitlab.config.performance_bar.allowed_group) end end |