mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 04:34:13 -06:00
FEATURE: use failed_to_login for SSO error (#7394)
The error displayed when logging into suspended accounts via SSO never includes the suspension reason, unlike non-SSO logins. By re-using the failed_to_login method when generating the error message for SSO we can ensure the message is consistent between the SSO and non-SSO paths.
This commit is contained in:
parent
d4bec7fdfb
commit
8673bd832a
@ -144,7 +144,7 @@ class SessionController < ApplicationController
|
||||
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)
|
||||
render_sso_error(text: failed_to_login(user)[:error], status: 403)
|
||||
return
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user