mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-25 20:46:12 +10:00
#1606 API private token via the header
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user