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
path: root/lib
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-08-03 15:00:08 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-08-03 15:00:08 +0300
commitb1bbcf85684cee176ed5bb7eb43dd487a75f18fa (patch)
treebda68adaad2e197482bf02f476e94b5908da1518 /lib
parentc7c74818948dbc63a284bb617b2af1937f999cc8 (diff)
Add latest changes from gitlab-org/security/gitlab@14-1-stable-ee
Diffstat (limited to 'lib')
-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 8cab2f65726..13e78e72175 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