summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzegorz@gitlab.com>2018-05-24 12:47:26 +0000
committerGrzegorz Bizon <grzegorz@gitlab.com>2018-05-24 12:47:26 +0000
commit05170e0d4731da2bd1920c91f1e9c9cbed3c4f17 (patch)
tree99a71a075f67cb5339d949482c5d4f744915105a /app
parent942fe5fe79f512b4c801fc887a1240a963b827d0 (diff)
parentb98a88cfe9033b5d694ac237a50ad4fe923ad95d (diff)
downloadgitlab-ce-05170e0d4731da2bd1920c91f1e9c9cbed3c4f17.tar.gz
Merge branch 'ce-jej/saml-failure-messages' into 'master'
[CE] Backport helpers from GroupSAML failure messages See merge request gitlab-org/gitlab-ce!19064
Diffstat (limited to 'app')
-rw-r--r--app/controllers/omniauth_callbacks_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/omniauth_callbacks_controller.rb b/app/controllers/omniauth_callbacks_controller.rb
index ed89bed029b..27fd5f7ba37 100644
--- a/app/controllers/omniauth_callbacks_controller.rb
+++ b/app/controllers/omniauth_callbacks_controller.rb
@@ -26,11 +26,11 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
# Extend the standard message generation to accept our custom exception
def failure_message
- exception = env["omniauth.error"]
+ exception = request.env["omniauth.error"]
error = exception.error_reason if exception.respond_to?(:error_reason)
error ||= exception.error if exception.respond_to?(:error)
error ||= exception.message if exception.respond_to?(:message)
- error ||= env["omniauth.error.type"].to_s
+ error ||= request.env["omniauth.error.type"].to_s
error.to_s.humanize if error
end