diff options
-rw-r--r-- | app/models/auth_source_ldap.rb | 3 | ||||
-rw-r--r-- | app/views/auth_sources/_form.rhtml | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/app/models/auth_source_ldap.rb b/app/models/auth_source_ldap.rb index fcb8447b7..c8b0a12c9 100644 --- a/app/models/auth_source_ldap.rb +++ b/app/models/auth_source_ldap.rb @@ -70,7 +70,8 @@ private def initialize_ldap_con(ldap_user, ldap_password) Net::LDAP.new( {:host => self.host, :port => self.port, - :auth => { :method => :simple, :username => ldap_user, :password => ldap_password }} + :auth => { :method => :simple, :username => ldap_user, :password => ldap_password }, + :encryption => (self.tls ? :simple_tls : nil)} ) end diff --git a/app/views/auth_sources/_form.rhtml b/app/views/auth_sources/_form.rhtml index b6365dce5..24d2913e3 100644 --- a/app/views/auth_sources/_form.rhtml +++ b/app/views/auth_sources/_form.rhtml @@ -9,7 +9,7 @@ <%= text_field 'auth_source', 'host' %></p> <p><label for="auth_source_port"><%=l(:field_port)%> <span class="required">*</span></label> -<%= text_field 'auth_source', 'port', :size => 6 %></p> +<%= text_field 'auth_source', 'port', :size => 6 %> <%= check_box 'auth_source', 'tls' %> LDAPS</p> <p><label for="auth_source_account"><%=l(:field_account)%></label> <%= text_field 'auth_source', 'account' %></p> |