Commit e9c356092bfa1545f4df35f11fb54dc121f825b2

Authored by Valeriy Sizov
1 parent d104df49

#1606 API private token via the header

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
lib/api/helpers.rb
1 module Gitlab 1 module Gitlab
2 module APIHelpers 2 module APIHelpers
3 def current_user 3 def current_user
4 - @current_user ||= User.find_by_authentication_token(params[:private_token]) 4 + @current_user ||= User.find_by_authentication_token(params[:private_token] || header[:private_token])
5 end 5 end
6 6
7 def user_project 7 def user_project