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:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-08-04 00:09:39 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-08-04 00:09:39 +0300
commit4bf395cded929b1f2d2419079d8107604c9f930f (patch)
treed6edb3ab04e1a8241f9ac44ebb789cfc6ebaeff9 /lib/gitlab/auth.rb
parent49058851264455c22a5ba00c8671b7d4cdfd8ee9 (diff)
Add latest changes from gitlab-org/gitlab@master
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