mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 01:05:11 +08:00
FEATURE: custom url to redirect to on account pending approval for sso
This commit is contained in:
@ -71,7 +71,11 @@ class SessionController < ApplicationController
|
||||
if user = sso.lookup_or_create_user(request.remote_ip)
|
||||
|
||||
if SiteSetting.must_approve_users? && !user.approved?
|
||||
render text: I18n.t("sso.account_not_approved"), status: 403
|
||||
if SiteSetting.sso_not_approved_url.present?
|
||||
redirect_to sso_not_approved_url
|
||||
else
|
||||
render text: I18n.t("sso.account_not_approved"), status: 403
|
||||
end
|
||||
return
|
||||
elsif !user.active?
|
||||
activation = UserActivator.new(user, request, session, cookies)
|
||||
|
Reference in New Issue
Block a user