comparison app/models/.svn/text-base/auth_source_ldap.rb.svn-base @ 245:051f544170fe

* Update to SVN trunk revision 4993
author Chris Cannam
date Thu, 03 Mar 2011 11:42:28 +0000
parents 513646585e45
children
comparison
equal deleted inserted replaced
244:8972b600f4fb 245:051f544170fe
18 require 'net/ldap' 18 require 'net/ldap'
19 require 'iconv' 19 require 'iconv'
20 20
21 class AuthSourceLdap < AuthSource 21 class AuthSourceLdap < AuthSource
22 validates_presence_of :host, :port, :attr_login 22 validates_presence_of :host, :port, :attr_login
23 validates_length_of :name, :host, :account_password, :maximum => 60, :allow_nil => true 23 validates_length_of :name, :host, :maximum => 60, :allow_nil => true
24 validates_length_of :account, :base_dn, :maximum => 255, :allow_nil => true 24 validates_length_of :account, :account_password, :base_dn, :maximum => 255, :allow_nil => true
25 validates_length_of :attr_login, :attr_firstname, :attr_lastname, :attr_mail, :maximum => 30, :allow_nil => true 25 validates_length_of :attr_login, :attr_firstname, :attr_lastname, :attr_mail, :maximum => 30, :allow_nil => true
26 validates_numericality_of :port, :only_integer => true 26 validates_numericality_of :port, :only_integer => true
27 27
28 before_validation :strip_ldap_attributes 28 before_validation :strip_ldap_attributes
29 29