Complete refactor of Gemfile and upgraded gems (#2553)

This commit is contained in:
Ahmad Farhat
2021-02-26 17:34:07 -05:00
committed by GitHub
parent c5b00e89aa
commit 09ab074aaf
29 changed files with 327 additions and 376 deletions

View File

@ -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']