diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-03 14:59:03 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-03 14:59:03 +0300 |
commit | acd33ab4ff107fc73b9dd310ba65e60bd3119c0b (patch) | |
tree | a9c6d3ff3d12576287f7428a6056b248f842ec65 /lib | |
parent | fd646aa53df4e56be42afe5f7ae4c894430ddcc9 (diff) |
Add latest changes from gitlab-org/security/gitlab@14-0-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 580c7042f1e..b835b21840e 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 |