summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Kozono <mkozono@gmail.com>2017-05-22 11:48:25 -0700
committerMichael Kozono <mkozono@gmail.com>2017-06-05 05:32:26 -0700
commit7d469cf1c1f356d950abc58ecbe6aa4ec15bd72b (patch)
treec8a90f5a529fd8fc39cb7d64e601ee9b655e629c
parente8972c11904c31fc614a31483098814adc38c2ac (diff)
downloadgitlab-ce-7d469cf1c1f356d950abc58ecbe6aa4ec15bd72b.tar.gz
Fix would-be regression
https://gitlab.com/gitlab-org/gitlab-ce/commit/57e3e942de1adef2c8621905370f07d7da7870c4 I changed it to a separate condition rather than depending on the order of the case-when statements to prevent this mistake again.
-rw-r--r--lib/gitlab/git_access.rb4
1 files changed, 1 insertions, 3 deletions
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