summaryrefslogtreecommitdiff
path: root/lib/api/helpers.rb
diff options
context:
space:
mode:
authorTimothy Andrew <mail@timothyandrew.net>2016-05-11 10:16:23 +0530
committerTimothy Andrew <mail@timothyandrew.net>2016-05-11 10:16:23 +0530
commitd915e7d5cad99b8971e65d30accc8bc7a05fecbc (patch)
tree0583e9d36fb2d38101737d0a891ac29b7d87c373 /lib/api/helpers.rb
parent2e9742997ddbfaeff350eb5334b7f641a779550c (diff)
downloadgitlab-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 'lib/api/helpers.rb')
-rw-r--r--lib/api/helpers.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index de9a1b0eb94..68642e2d8a7 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -4,8 +4,8 @@ module API
PRIVATE_TOKEN_PARAM = :private_token
SUDO_HEADER ="HTTP_SUDO"
SUDO_PARAM = :sudo
- PERSONAL_ACCESS_TOKEN_PARAM = :personal_access_token
- PERSONAL_ACCESS_TOKEN_HEADER = "HTTP_PERSONAL_ACCESS_TOKEN"
+ PERSONAL_ACCESS_TOKEN_PARAM = PRIVATE_TOKEN_PARAM
+ PERSONAL_ACCESS_TOKEN_HEADER = PRIVATE_TOKEN_HEADER
def parse_boolean(value)
[ true, 1, '1', 't', 'T', 'true', 'TRUE', 'on', 'ON' ].include?(value)