Commit 7425f2b3 authored by James Edwards-Jones's avatar James Edwards-Jones

Backport IdentityLinker#failed? from GroupSaml callback flow

parent 4bf47cd7
...@@ -82,7 +82,7 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController ...@@ -82,7 +82,7 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
if identity_linker.changed? if identity_linker.changed?
redirect_identity_linked redirect_identity_linked
elsif identity_linker.error_message.present? elsif identity_linker.failed?
redirect_identity_link_failed(identity_linker.error_message) redirect_identity_link_failed(identity_linker.error_message)
else else
redirect_identity_exists redirect_identity_exists
......
...@@ -17,6 +17,10 @@ module Gitlab ...@@ -17,6 +17,10 @@ module Gitlab
@changed @changed
end end
def failed?
error_message.present?
end
def error_message def error_message
identity.validate 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