summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorPatricio Cano <suprnova32@gmail.com>2016-09-06 16:32:39 -0500
committerPatricio Cano <suprnova32@gmail.com>2016-09-15 12:21:00 -0500
commitc144db2935f0f71c7f282a3015d126526bc16b57 (patch)
treebe83c7b4dac7e56c236de5eb9d1dde9173eec965 /lib/api
parent85152f0291b7e6dd4a92a068e7d5c4334df54e80 (diff)
downloadgitlab-ce-c144db2935f0f71c7f282a3015d126526bc16b57.tar.gz
Better authentication handling, syntax fixes and better actor handling for LFS Tokens
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/internal.rb9
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/api/internal.rb b/lib/api/internal.rb
index 1f189d81d16..f8211bdd8af 100644
--- a/lib/api/internal.rb
+++ b/lib/api/internal.rb
@@ -78,14 +78,7 @@ module API
status 200
key = Key.find(params[:key_id])
- user = key.user
-
- token_handler =
- if user
- Gitlab::LfsToken.new(user)
- else
- Gitlab::LfsToken.new(key)
- end
+ token_handler = Gitlab::LfsToken.new(key)
{
username: token_handler.actor_name,