Commit 7d8af70a authored by Jean-Philippe Lang's avatar Jean-Philippe Lang

Changed the maximum length of LDAP account to 255 characters.

Added length validations on AuthSource model.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@948 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 8c65cc47
......@@ -20,6 +20,9 @@ class AuthSource < ActiveRecord::Base
validates_presence_of :name
validates_uniqueness_of :name
validates_length_of :name, :host, :account_password, :maximum => 60
validates_length_of :account, :base_dn, :maximum => 255
validates_length_of :attr_login, :attr_firstname, :attr_lastname, :attr_mail, :maximum => 30
def authenticate(login, password)
end
......
class ChangeAuthSourcesAccountLimit < ActiveRecord::Migration
def self.up
change_column :auth_sources, :account, :string
end
def self.down
change_column :auth_sources, :account, :string, :limit => 60
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