Commit f88a6e0b authored by Douwe Maan's avatar Douwe Maan

Fix conflicts in lib/api/api_guard.rb and lib/api/helpers.rb

parent f3593512
......@@ -92,7 +92,9 @@ module API
raise UnauthorizedError unless user
<<<<<<< HEAD
user
end
def find_user_by_job_token
return @user_by_job_token if defined?(@user_by_job_token)
......@@ -103,13 +105,6 @@ module API
end
end
def current_user
@current_user
=======
user
>>>>>>> upstream/master
end
private
def route_authentication_setting
......
......@@ -423,19 +423,6 @@ module API
def initial_current_user
return @initial_current_user if defined?(@initial_current_user)
<<<<<<< HEAD
Gitlab::Auth::UniqueIpsLimiter.limit_user! do
@initial_current_user ||= find_user_by_private_token(scopes: scopes_registered_for_endpoint)
@initial_current_user ||= doorkeeper_guard(scopes: scopes_registered_for_endpoint)
@initial_current_user ||= find_user_from_warden
@initial_current_user ||= find_user_by_job_token
unless @initial_current_user && Gitlab::UserAccess.new(@initial_current_user).allowed?
@initial_current_user = nil
end
=======
>>>>>>> upstream/master
begin
@initial_current_user = Gitlab::Auth::UniqueIpsLimiter.limit_user! { find_current_user }
......@@ -448,7 +435,8 @@ module API
user =
find_user_by_private_token(scopes: scopes_registered_for_endpoint) ||
doorkeeper_guard(scopes: scopes_registered_for_endpoint) ||
find_user_from_warden
find_user_from_warden ||
find_user_by_job_token
return nil unless user
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment