From 1a0d6dbdc2ac3047f4953a359ef27ba6e26074ae Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 1 Apr 2020 12:08:00 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- lib/api/api_guard.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/api/api_guard.rb') 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 -- cgit v1.2.1