diff options
author | Timothy Andrew <mail@timothyandrew.net> | 2016-05-11 10:16:23 +0530 |
---|---|---|
committer | Timothy Andrew <mail@timothyandrew.net> | 2016-05-11 10:16:23 +0530 |
commit | d915e7d5cad99b8971e65d30accc8bc7a05fecbc (patch) | |
tree | 0583e9d36fb2d38101737d0a891ac29b7d87c373 /app/controllers/application_controller.rb | |
parent | 2e9742997ddbfaeff350eb5334b7f641a779550c (diff) | |
download | gitlab-ce-d915e7d5cad99b8971e65d30accc8bc7a05fecbc.tar.gz |
Reuse the private token param and header for personal access tokens.
- https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3749#note_11626427
- Personal access tokens are still a separate entity as far as the
codebase is concerned - they just happen to use the same entry point
as private tokens.
- Update tests and documentation to reflect this change
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r-- | app/controllers/application_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 72ba1a85cff..b26afb42e74 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -80,7 +80,7 @@ class ApplicationController < ActionController::Base end def authenticate_user_from_personal_access_token! - token_string = params[:personal_access_token].presence || request.headers['PERSONAL_ACCESS_TOKEN'].presence + token_string = params[:private_token].presence || request.headers['PRIVATE-TOKEN'].presence personal_access_token = PersonalAccessToken.active.find_by_token(token_string) user = personal_access_token && personal_access_token.user |