Firstname, lastname and email LDAP attributes are now required if "on-the-fly register" is checked.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@631 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2007-08-14 09:14:33 +00:00
parent ecf208f660
commit 7e755a53b8
1 changed files with 2 additions and 1 deletions

View File

@ -20,7 +20,8 @@ require 'iconv'
class AuthSourceLdap < AuthSource
validates_presence_of :host, :port, :attr_login
validates_presence_of :attr_firstname, :attr_lastname, :attr_mail, :if => Proc.new { |a| a.onthefly_register? }
def after_initialize
self.port = 389 if self.port == 0
end