FIX: verify presence of 'sso url' before enabling 'enable sso'

This commit is contained in:
Arpit Jalan
2017-12-23 13:30:49 +05:30
parent a7a0cba45b
commit 0514ac4ee2
4 changed files with 64 additions and 0 deletions

View File

@ -0,0 +1,14 @@
class EnableSsoValidator
def initialize(opts = {})
@opts = opts
end
def valid_value?(val)
return true if val == 'f'
SiteSetting.sso_url.present?
end
def error_message
I18n.t('site_settings.errors.sso_url_is_empty')
end
end