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:
authorPatricio Cano <suprnova32@gmail.com>2016-08-18 01:39:20 +0300
committerPatricio Cano <suprnova32@gmail.com>2016-08-19 00:47:26 +0300
commita4137411c62d093a55dc171665dc90325182bb04 (patch)
tree3000d1645362d274eab02b1bd46cb6b4f3e063c1 /lib/api/session.rb
parentc29780086201b331091be3ba5df0653381cf0c2c (diff)
Small refactor and syntax fixes.
Diffstat (limited to 'lib/api/session.rb')
-rw-r--r--lib/api/session.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/session.rb b/lib/api/session.rb
index b26be3be22e..55ec66a6d67 100644
--- a/lib/api/session.rb
+++ b/lib/api/session.rb
@@ -14,7 +14,7 @@ module API
user = Gitlab::Auth.find_with_user_password(params[:email] || params[:login], params[:password])
return unauthorized! unless user
- return render_2fa_error! if user.two_factor_enabled?
+ return render_api_error!('401 Unauthorized. You have 2FA enabled. Please use a personal access token to access the API', 401) if user.two_factor_enabled?
present user, with: Entities::UserLogin
end
end