Commit e7608cd6f955c488844f30069af8ca71cb2677c4
1 parent
2e1c3c52
Exists in
master
and in
4 other branches
API: private token via 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] || header["private_token"]) | 4 | + @current_user ||= User.find_by_authentication_token(params[:private_token] || env["HTTP_PRIVATE_TOKEN"]) |
5 | end | 5 | end |
6 | 6 | ||
7 | def user_project | 7 | def user_project |