mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 05:40:52 +08:00
FIX: add error for suspended users attempting to login via sso
This commit is contained in:
parent
47e4c9bb46
commit
4b42a0abc9
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user