diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-03 12:00:08 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-03 12:00:08 +0000 |
commit | b1bbcf85684cee176ed5bb7eb43dd487a75f18fa (patch) | |
tree | bda68adaad2e197482bf02f476e94b5908da1518 /lib | |
parent | c7c74818948dbc63a284bb617b2af1937f999cc8 (diff) | |
download | gitlab-ce-b1bbcf85684cee176ed5bb7eb43dd487a75f18fa.tar.gz |
Add latest changes from gitlab-org/security/gitlab@14-1-stable-ee
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/auth.rb | 5 |
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 |