forked from External/greenlight
Complete refactor of Gemfile and upgraded gems (#2553)
This commit is contained in:
@ -125,13 +125,14 @@ class SessionsController < ApplicationController
|
||||
def ldap
|
||||
ldap_config = {}
|
||||
ldap_config[:host] = ENV['LDAP_SERVER']
|
||||
ldap_config[:port] = ENV['LDAP_PORT'].to_i != 0 ? ENV['LDAP_PORT'].to_i : 389
|
||||
ldap_config[:port] = ENV['LDAP_PORT'].to_i.zero? ? 389 : ENV['LDAP_PORT'].to_i
|
||||
ldap_config[:bind_dn] = ENV['LDAP_BIND_DN']
|
||||
ldap_config[:password] = ENV['LDAP_PASSWORD']
|
||||
ldap_config[:auth_method] = ENV['LDAP_AUTH']
|
||||
ldap_config[:encryption] = if ENV['LDAP_METHOD'] == 'ssl'
|
||||
ldap_config[:encryption] = case ENV['LDAP_METHOD']
|
||||
when 'ssl'
|
||||
'simple_tls'
|
||||
elsif ENV['LDAP_METHOD'] == 'tls'
|
||||
when 'tls'
|
||||
'start_tls'
|
||||
end
|
||||
ldap_config[:base] = ENV['LDAP_BASE']
|
||||
|
Reference in New Issue
Block a user