OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Move redirect_omniauth_register_modal into concern
Oliver Günther3a3abc9357ff
diff --git a/app/controllers/concerns/accounts/registration.rb b/app/controllers/concerns/accounts/registration.rbindex 655b185151f..cb995e03c1b 100644--- a/app/controllers/concerns/accounts/registration.rb+++ b/app/controllers/concerns/accounts/registration.rb@@ -101,6 +101,14 @@ module Accounts::Registrationendend+ def redirect_omniauth_register_modal(user, auth_hash)+ # Store a timestamp so we can later make sure that authentication information can+ # only be reused for a short time.+ session[:auth_source_registration] = auth_hash.merge(omniauth: true, timestamp: Time.current)+ @user = user+ render template: "/account/register"+ end+def respond_for_registered_user(user)call = ::Users::RegisterUserService.new(user).calldiff --git a/app/controllers/omni_auth_login_controller.rb b/app/controllers/omni_auth_login_controller.rbindex 62e8569c492..b6729310a6e 100644--- a/app/controllers/omni_auth_login_controller.rb+++ b/app/controllers/omni_auth_login_controller.rb@@ -71,14 +71,6 @@ class OmniAuthLoginController < ApplicationControllermessage&.to_s || "Unknown error"end- def redirect_omniauth_register_modal(user, auth_hash)- # Store a timestamp so we can later make sure that authentication information can- # only be reused for a short time.- session[:auth_source_registration] = auth_hash.merge(omniauth: true, timestamp: Time.current)- @user = user- render template: "/account/register"- end-# Avoid remembering the back_url if we're coming from the login pagedef remember_back_url?return false if omniauth_back_url.blank?