Commit 16dcf356 authored by GitLab's avatar GitLab

Fix style points

To make Rubocop and Douwe happy
parent 6912f21e
...@@ -180,13 +180,7 @@ module Grack ...@@ -180,13 +180,7 @@ module Grack
end end
def render_grack_auth_ok def render_grack_auth_ok
if @user.present? [200, { "Content-Type" => "application/json" }, [JSON.dump({ 'GL_ID' => Gitlab::ShellEnv.gl_id(@user) })]]
gl_id = Gitlab::ShellEnv.gl_id(@user)
else
gl_id = ''
end
[200, { "Content-Type" => "application/json" }, [JSON.dump({'GL_ID' => gl_id})]]
end end
def render_not_found def render_not_found
......
...@@ -17,7 +17,12 @@ module Gitlab ...@@ -17,7 +17,12 @@ module Gitlab
end end
def gl_id(user) def gl_id(user)
if user.present?
"user-#{user.id}" "user-#{user.id}"
else
# This empty string is used in the render_grack_auth_ok method
""
end
end end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment