diff options
author | Valeriy Sizov <vsv2711@gmail.com> | 2012-10-02 19:43:35 +0400 |
---|---|---|
committer | Valeriy Sizov <vsv2711@gmail.com> | 2012-10-02 19:43:35 +0400 |
commit | e7608cd6f955c488844f30069af8ca71cb2677c4 (patch) | |
tree | 3c41bebc1314b4d0c27adbd8b5c1b70b1373fedb /lib | |
parent | 2e1c3c52bc43d08bc01cf3ba5fba377b3236223b (diff) |
API: private token via header
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/helpers.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index e9fec8b3a92..a339ec4a6fc 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -1,7 +1,7 @@ module Gitlab module APIHelpers 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 def user_project |