FIX: add error for suspended users attempting to login via sso

This commit is contained in:
Sam 2017-11-14 16:52:00 +11:00
parent 47e4c9bb46
commit 4b42a0abc9

View File

@ -107,6 +107,11 @@ class SessionController < ApplicationController
begin
if user = sso.lookup_or_create_user(request.remote_ip)
if user.suspended?
render_sso_error(text: I18n.t("login.suspended", date: user.suspended_till), status: 403)
return
end
if SiteSetting.must_approve_users? && !user.approved?
if SiteSetting.sso_not_approved_url.present?
redirect_to SiteSetting.sso_not_approved_url