API: private token via header
This commit is contained in:
parent
2e1c3c52bc
commit
e7608cd6f9
1 changed files with 1 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
||||||
module Gitlab
|
module Gitlab
|
||||||
module APIHelpers
|
module APIHelpers
|
||||||
def current_user
|
def current_user
|
||||||
@current_user ||= User.find_by_authentication_token(params[:private_token] || header["private_token"])
|
@current_user ||= User.find_by_authentication_token(params[:private_token] || env["HTTP_PRIVATE_TOKEN"])
|
||||||
end
|
end
|
||||||
|
|
||||||
def user_project
|
def user_project
|
||||||
|
|
Loading…
Add table
Reference in a new issue