diff options
author | Michael Kozono <mkozono@gmail.com> | 2017-06-09 20:39:29 +0300 |
---|---|---|
committer | Michael Kozono <mkozono@gmail.com> | 2017-07-26 12:43:36 +0300 |
commit | 72d8b1e40aa96f575aac9a8c9dada09e66cd7a9d (patch) | |
tree | 6e9ce22aa0aa4f6a3e18f52952d95a414f7e5b79 /config/initializers | |
parent | 2d7d1fa69db2b5e0056d5ab8884684886229f852 (diff) |
Move backwards compatibility logic out of the code
And closer to the configuration setup. The code doesn’t need to know about this.
Diffstat (limited to 'config/initializers')
-rw-r--r-- | config/initializers/1_settings.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb index 9344a42540b..20fe92dd6b3 100644 --- a/config/initializers/1_settings.rb +++ b/config/initializers/1_settings.rb @@ -145,7 +145,11 @@ if Settings.ldap['enabled'] || Rails.env.test? server['attributes'] = {} if server['attributes'].nil? server['provider_name'] ||= "ldap#{key}".downcase server['provider_class'] = OmniAuth::Utils.camelize(server['provider_name']) - server['encryption'] ||= server['method'] # for backwards compatibility + + # For backwards compatibility + server['encryption'] ||= server['method'] + server['encryption'] = 'simple_tls' if server['encryption'] == 'ssl' + server['encryption'] = 'start_tls' if server['encryption'] == 'tls' # Certificates are not verified for backwards compatibility. # This default should be flipped to true in 9.5. |