Project

General

Profile

« Previous | Next » 

Revision 98217996

Added by Marc Dequènes almost 14 years ago

  • ID 9821799643b84c1515f3c342036686bd3a266f73

[evol] switched to a higher activeldap library (closes #27)

View differences:

lib/ldap_shadows/shadow.rb
item_list = {}
if all_objects
ActiveLdap::Base.find(:all, :base => search_base, :scope => :sub, :attributes => ['']).each do |item|
item_list[ActiveLdap::DistinguishedName.parse(item.dn)]= item
item_list[item.dn]= item
end
else
self.get_config[:presentation][:tree_objects].each do |obj_hdl|
......
end
obj_klass.find(:all, :base => search_base, :scope => :sub).each do |item|
item_list[item.dn_obj] = item
item_list[item.dn] = item
end
end
end
......
raw_tree = {}
tree = {}
base_dn = ActiveLdap::DistinguishedName.parse(ActiveLdap::Base.base)
base_dn = ActiveLdap::Base.base
dn_list = item_list.keys
dn_list.each do |dn|
......
current_dn = ActiveLdap::DistinguishedName.parse(current_dn_parts.join(","))
current_item = item_list[current_dn]
if current_item.nil?
current_item = ActiveLdap::Base.find(:first, :base => current_dn.to_s, :scope => :base, :attributes => [''])
current_item = ActiveLdap::Base.find(:first, :base => current_dn, :scope => :base, :attributes => [''])
item_list[current_dn] = current_item
end
p_item = LdapShadows::Manipulation.raw_item_info(self, item_list[current_dn])[:name]
......
if raw
res = {base_dn.to_s => raw_tree}
else
base_obj = ActiveLdap::Base.find(:first, :base => base_dn.to_s, :scope => :base, :attributes => [''])
base_obj = ActiveLdap::Base.find(:first, :base => base_dn, :scope => :base, :attributes => [''])
res = {LdapShadows::Manipulation.raw_item_info(self, base_obj)[:name] => tree}
end

Also available in: Unified diff