mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 08:51:05 +08:00
FIX: don't return 200s when login is required to paths
When running `ensure_login_required` it should always happen prior to `check_xhr` cause check xhr will trigger a 200 response
This commit is contained in:
@ -4,7 +4,7 @@ require_dependency 'email_updater'
|
||||
|
||||
class UsersEmailController < ApplicationController
|
||||
|
||||
before_action :ensure_logged_in, only: [:index, :update]
|
||||
prepend_before_action :check_xhr, :ensure_logged_in, only: [:index, :update]
|
||||
|
||||
skip_before_action :check_xhr, only: [:confirm]
|
||||
skip_before_action :redirect_to_login_if_required, only: [:confirm]
|
||||
|
Reference in New Issue
Block a user