diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-20 14:10:13 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-20 14:10:13 +0300 |
commit | 0ea3fcec397b69815975647f5e2aa5fe944a8486 (patch) | |
tree | 7979381b89d26011bcf9bdc989a40fcc2f1ed4ff /app/controllers/sessions_controller.rb | |
parent | 72123183a20411a36d607d70b12d57c484394c8e (diff) |
Add latest changes from gitlab-org/gitlab@15-1-stable-eev15.1.0-rc42
Diffstat (limited to 'app/controllers/sessions_controller.rb')
-rw-r--r-- | app/controllers/sessions_controller.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index 66a531b0b3b..9000e9c39de 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -127,7 +127,9 @@ class SessionsController < Devise::SessionsController flash[:alert] = _('There was an error with the reCAPTCHA. Please solve the reCAPTCHA again.') flash.delete :recaptcha_error - redirect_to new_user_session_path + add_gon_variables + + respond_with_navigational(resource) { render :new } end end @@ -181,7 +183,6 @@ class SessionsController < Devise::SessionsController # Handle an "initial setup" state, where there's only one user, it's an admin, # and they require a password change. - # rubocop: disable CodeReuse/ActiveRecord def check_initial_setup return unless User.limit(2).count == 1 # Count as much 2 to know if we have exactly one @@ -196,7 +197,6 @@ class SessionsController < Devise::SessionsController redirect_to edit_user_password_path(reset_password_token: @token), notice: _("Please create a password for your new account.") end - # rubocop: enable CodeReuse/ActiveRecord def ensure_password_authentication_enabled! render_403 unless Gitlab::CurrentSettings.password_authentication_enabled_for_web? |