Mercurial > hg > soundsoftware-site
comparison app/models/.svn/text-base/auth_source_ldap.rb.svn-base @ 246:eeebe205a056 cannam
* Merge from default branch, bringing us up to SVN trunk rev 4993
author | Chris Cannam |
---|---|
date | Thu, 03 Mar 2011 12:02:03 +0000 |
parents | 051f544170fe |
children |
comparison
equal
deleted
inserted
replaced
138:fca2657f4aa5 | 246:eeebe205a056 |
---|---|
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 |