mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 18:30:26 -06:00
FIX: Keep the flash when redirecting for login_required
This commit is contained in:
parent
ca965f83c3
commit
6eb6c25816
@ -554,8 +554,9 @@ class ApplicationController < ActionController::Base
|
||||
def redirect_to_login_if_required
|
||||
return if current_user || (request.format.json? && is_api?)
|
||||
|
||||
# redirect user to the SSO page if we need to log in AND SSO is enabled
|
||||
if SiteSetting.login_required?
|
||||
flash.keep
|
||||
|
||||
if SiteSetting.enable_sso?
|
||||
# save original URL in a session so we can redirect after login
|
||||
session[:destination_url] = destination_url
|
||||
|
Loading…
Reference in New Issue
Block a user