diff options
author | Nick Thomas <nick@gitlab.com> | 2019-02-07 10:02:10 +0000 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2019-02-07 10:02:10 +0000 |
commit | 198ba5a05134bdb2047bb7cd28e91e2116119cf7 (patch) | |
tree | 3ef1c2672b9d7da3a45bbb05298827522c5c68d5 | |
parent | d91b96458e59345dd9ad5b9e3d03a12db6c78270 (diff) | |
parent | 24f3f9600484efcf088c73509a4f3c72fc30fff0 (diff) | |
download | gitlab-ce-198ba5a05134bdb2047bb7cd28e91e2116119cf7.tar.gz |
Merge branch 'ce-jej/group-saml-sso-when-signed-out' into 'master'
[CE] Backport build_auth_user for GroupSAML callback
See merge request gitlab-org/gitlab-ce!24979
-rw-r--r-- | app/controllers/omniauth_callbacks_controller.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/omniauth_callbacks_controller.rb b/app/controllers/omniauth_callbacks_controller.rb index 97120273d6b..cc2bb99f55b 100644 --- a/app/controllers/omniauth_callbacks_controller.rb +++ b/app/controllers/omniauth_callbacks_controller.rb @@ -116,8 +116,12 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController session[:service_tickets][provider] = ticket end + def build_auth_user(auth_user_class) + auth_user_class.new(oauth) + end + def sign_in_user_flow(auth_user_class) - auth_user = auth_user_class.new(oauth) + auth_user = build_auth_user(auth_user_class) user = auth_user.find_and_update! if auth_user.valid_sign_in? |