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
pull/351/head
Jean-Philippe Lang 17 years ago
parent ecf208f660
commit 7e755a53b8
  1. 3
      app/models/auth_source_ldap.rb

@ -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

Loading…
Cancel
Save