diff options
author | Valeriy Sizov <vsv2711@gmail.com> | 2012-10-02 18:02:21 +0300 |
---|---|---|
committer | Valeriy Sizov <vsv2711@gmail.com> | 2012-10-02 18:02:21 +0300 |
commit | e9c356092bfa1545f4df35f11fb54dc121f825b2 (patch) | |
tree | 02c01f7ce61b9264214fd425a0c39ccbc7ccb96f /lib/api/helpers.rb | |
parent | d104df49e743a52b42c63a4ccca6be67bdf775d7 (diff) | |
download | gitlab-ce-e9c356092bfa1545f4df35f11fb54dc121f825b2.tar.gz |
#1606 API private token via the header
Diffstat (limited to 'lib/api/helpers.rb')
-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 da1d2bd02f9..78d93b65f89 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]) + @current_user ||= User.find_by_authentication_token(params[:private_token] || header[:private_token]) end def user_project |