Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancisco Lopez <fjlopez@gitlab.com>2017-11-08 12:13:22 +0300
committerFrancisco Lopez <fjlopez@gitlab.com>2017-11-17 12:01:21 +0300
commit374179a97042da3a4d5312afcdb0dc90a44634f0 (patch)
tree32c75aada478c764f4ebdd36f3b981f968d4f452 /lib/api/api_guard.rb
parent41ebd06ddc837c80ba6ca95c6d5fea2b76cef8d2 (diff)
Removing private token
Diffstat (limited to 'lib/api/api_guard.rb')
-rw-r--r--lib/api/api_guard.rb7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/api/api_guard.rb b/lib/api/api_guard.rb
index 9ada2d5ebb1..9c68830ae34 100644
--- a/lib/api/api_guard.rb
+++ b/lib/api/api_guard.rb
@@ -45,6 +45,7 @@ module API
include Gitlab::Utils::StrongMemoize
def find_current_user!
+ set_raise_unauthorized_error
user = find_user_from_access_token || find_user_from_warden
return unless user
@@ -74,12 +75,6 @@ module API
private
- def handle_return_value!(value, &block)
- raise UnauthorizedError unless value
-
- block_given? ? yield(value) : value
- end
-
def private_token
params[PRIVATE_TOKEN_PARAM].presence || env[PRIVATE_TOKEN_HEADER].presence
end