Commit 534b7023 authored by Douwe Maan's avatar Douwe Maan

Merge branch 'ce-jej/group-saml-callback-flow' into 'master'

Backport IdentityLinker#failed? from GroupSaml callback flow

See merge request gitlab-org/gitlab-ce!18749
parents 390f78a2 7425f2b3
......@@ -82,7 +82,7 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
if identity_linker.changed?
redirect_identity_linked
elsif identity_linker.error_message.present?
elsif identity_linker.failed?
redirect_identity_link_failed(identity_linker.error_message)
else
redirect_identity_exists
......
......@@ -17,6 +17,10 @@ module Gitlab
@changed
end
def failed?
error_message.present?
end
def error_message
identity.validate
......
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