google-code-export / ruby-activeldap

Automatically exported from code.google.com/p/ruby-activeldap
Other
1 stars 1 forks source link

ActiveLdap::Base#attributes returns Array for non RDN and SINGLE-VALUE attributes #31

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create model user.rb
class User < ActiveLdap::Base
  ldap_mapping :dn_attribute => "uid", :prefix => "ou=users", :classes => 
['posixAccount'], :scope => :one
end
2. run script/console
3. create User
4. User.find(:first).attributes

What is the expected output?
=> {"objectClass"=>["posixAccount"], "uid"=>"admin", "cn"=>["User"], 
"uidNumber"=> "10020", "gidNumber"=> "10000", "homeDirectory"=>["/opt/
storage/admin"]}

What do you see instead?
=> {"objectClass"=>["posixAccount"], "uid"=>"admin", "cn"=>["User"], 
"uidNumber"=>["10020"], "gidNumber"=>["10000"], "homeDirectory"=>["/opt/
storage/admin"]}

Please solve this issue if this is defect and don't take many time to 
solve.
Thanks.

Original issue reported on code.google.com by Alexey.Chebotar@gmail.com on 4 Oct 2009 at 1:08

GoogleCodeExporter commented 9 years ago
{"objectClass"=>["posixAccount"], "uid"=>"admin", "cn"=>["User"], "uidNumber"=>
10020, "gidNumber"=> 10000, "homeDirectory"=>["/opt/storage/admin"]}
is returned in trunk.

Original comment by kou...@gmail.com on 4 Oct 2009 at 1:56