mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:21:18 +08:00
FEATURE: sso_overrides_(email|username|name) for all auth methods
These settings previously applied only to discourse-sso. Now they work for all external authentication methods.
This commit is contained in:
@ -7,15 +7,12 @@ class SsoOverridesEmailValidator
|
||||
|
||||
def valid_value?(val)
|
||||
return true if val == 'f'
|
||||
return false if !SiteSetting.enable_sso?
|
||||
return false if SiteSetting.email_editable?
|
||||
true
|
||||
end
|
||||
|
||||
def error_message
|
||||
if !SiteSetting.enable_sso?
|
||||
I18n.t('site_settings.errors.enable_sso_disabled')
|
||||
elsif SiteSetting.email_editable?
|
||||
if SiteSetting.email_editable?
|
||||
I18n.t('site_settings.errors.email_editable_enabled')
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user