Merge pull request #3227 from sigginet/patch-1

FIX: Forward to SSO login automatically
This commit is contained in:
Sam 2015-02-24 10:42:30 +11:00
commit 0ccce7a59b

View file

@ -389,7 +389,15 @@ class ApplicationController < ActionController::Base
# save original URL in a cookie
cookies[:destination_url] = request.original_url unless request.original_url =~ /uploads/
redirect_to :login if SiteSetting.login_required?
# redirect user to the SSO page if we need to log in AND SSO is enabled
if SiteSetting.login_required?
if SiteSetting.enable_sso?
redirect_to '/session/sso'
else
redirect_to :login
end
end
end
def block_if_readonly_mode