diff --git a/lib/gitlab/git_access.rb b/lib/gitlab/git_access.rb index 176b0991971..75cc69c02f7 100644 --- a/lib/gitlab/git_access.rb +++ b/lib/gitlab/git_access.rb @@ -243,9 +243,7 @@ module Gitlab when User actor when Key - actor.user - when DeployKey - nil + actor.user unless actor.is_a?(DeployKey) when :ci nil end