Commit f4b97c03 authored by jplang's avatar jplang
Browse files

LDAP filter changed to text (#20929).

git-svn-id: https://svn.redmine.org/redmine/trunk@14725 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 47ca2faf
...@@ -22,7 +22,7 @@ require 'timeout' ...@@ -22,7 +22,7 @@ require 'timeout'
class AuthSourceLdap < AuthSource class AuthSourceLdap < AuthSource
validates_presence_of :host, :port, :attr_login validates_presence_of :host, :port, :attr_login
validates_length_of :name, :host, :maximum => 60, :allow_nil => true validates_length_of :name, :host, :maximum => 60, :allow_nil => true
validates_length_of :account, :account_password, :base_dn, :filter, :maximum => 255, :allow_blank => true validates_length_of :account, :account_password, :base_dn, :maximum => 255, :allow_blank => true
validates_length_of :attr_login, :attr_firstname, :attr_lastname, :attr_mail, :maximum => 30, :allow_nil => true validates_length_of :attr_login, :attr_firstname, :attr_lastname, :attr_mail, :maximum => 30, :allow_nil => true
validates_numericality_of :port, :only_integer => true validates_numericality_of :port, :only_integer => true
validates_numericality_of :timeout, :only_integer => true, :allow_blank => true validates_numericality_of :timeout, :only_integer => true, :allow_blank => true
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
:onfocus => "this.value=''; this.name='auth_source[account_password]';", :onfocus => "this.value=''; this.name='auth_source[account_password]';",
:onchange => "this.name='auth_source[account_password]';" %></p> :onchange => "this.name='auth_source[account_password]';" %></p>
<p><%= f.text_field :base_dn, :required => true, :size => 60 %></p> <p><%= f.text_field :base_dn, :required => true, :size => 60 %></p>
<p><%= f.text_field :filter, :size => 60, :label => :field_auth_source_ldap_filter %></p> <p><%= f.text_area :filter, :size => 60, :label => :field_auth_source_ldap_filter %></p>
<p><%= f.text_field :timeout, :size => 4 %></p> <p><%= f.text_field :timeout, :size => 4 %></p>
<p><%= f.check_box :onthefly_register, :label => :field_onthefly %></p> <p><%= f.check_box :onthefly_register, :label => :field_onthefly %></p>
</div> </div>
......
class ChangeAuthSourcesFilterToText < ActiveRecord::Migration
def self.up
change_column :auth_sources, :filter, :text
end
def self.down
change_column :auth_sources, :filter, :string
end
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment