diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-01 12:08:00 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-01 12:08:00 +0000 |
commit | 1a0d6dbdc2ac3047f4953a359ef27ba6e26074ae (patch) | |
tree | ddb78a8a0d1350dc767f049a21e0f7d37edaa82c /lib/api/api_guard.rb | |
parent | b11f7057d067885619ee3e513751f180b2e8ad85 (diff) | |
download | gitlab-ce-1a0d6dbdc2ac3047f4953a359ef27ba6e26074ae.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/api/api_guard.rb')
-rw-r--r-- | lib/api/api_guard.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/api/api_guard.rb b/lib/api/api_guard.rb index 5cab13f001e..9dd2de5c7ba 100644 --- a/lib/api/api_guard.rb +++ b/lib/api/api_guard.rb @@ -46,6 +46,10 @@ module API prepend_if_ee('EE::API::APIGuard::HelperMethods') # rubocop: disable Cop/InjectEnterpriseEditionModule include Gitlab::Auth::AuthFinders + def access_token + super || find_personal_access_token_from_http_basic_auth + end + def find_current_user! user = find_user_from_sources return unless user |