Improve SSO verbose log when user record is invalid.
This commit is contained in:
parent
72c16967e6
commit
ee449b0dd5
|
@ -137,15 +137,18 @@ class SessionController < ApplicationController
|
|||
rescue ActiveRecord::RecordInvalid => e
|
||||
|
||||
if SiteSetting.verbose_sso_logging
|
||||
Rails.logger.warn(<<-EOF)
|
||||
Verbose SSO log: Record was invalid: #{e.record.class.name} #{e.record.id}\n
|
||||
#{e.record.errors.to_h}\n
|
||||
\n
|
||||
#{sso.diagnostics}
|
||||
Rails.logger.warn(<<~EOF)
|
||||
Verbose SSO log: Record was invalid: #{e.record.class.name} #{e.record.id}
|
||||
#{e.record.errors.to_h}
|
||||
|
||||
Attributes:
|
||||
#{e.record.attributes.slice(*SingleSignOn::ACCESSORS.map(&:to_s))}
|
||||
|
||||
SSO Diagnostics:
|
||||
#{sso.diagnostics}
|
||||
EOF
|
||||
end
|
||||
|
||||
|
||||
text = nil
|
||||
|
||||
# If there's a problem with the email we can explain that
|
||||
|
|
Loading…
Reference in New Issue