Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/auth.rb')
-rw-r--r--lib/gitlab/auth.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/gitlab/auth.rb b/lib/gitlab/auth.rb
index 0877a31e0f9..4bac00ac440 100644
--- a/lib/gitlab/auth.rb
+++ b/lib/gitlab/auth.rb
@@ -193,7 +193,10 @@ module Gitlab
def personal_access_token_check(password, project)
return unless password.present?
- token = PersonalAccessTokensFinder.new(state: 'active').find_by_token(password)
+ finder_options = { state: 'active' }
+ finder_options[:impersonation] = false unless Gitlab.config.gitlab.impersonation_enabled
+
+ token = PersonalAccessTokensFinder.new(finder_options).find_by_token(password)
return unless token