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/lang_additions.rb
# for ActiveLDAP
module ActiveLdap
class DistinguishedName
def shift
@rdns.shift
end
end
class Base
def family_parent_dn
pdn = self.dn_obj.dup
pdn.shift
pdn
self.dn.parent
end
def family_parent
ActiveLdap::Base.find(:first, :base => self.family_parent_dn.to_s, :scope => :base)
ActiveLdap::Base.find(:first, :base => self.family_parent_dn, :scope => :base)
end
def family_children
......
end
def family_siblings
ActiveLdap::Base.find(:all, :base => self.family_parent_dn.to_s, :scope => :one).select{|obj| obj.dn != self.dn }
ActiveLdap::Base.find(:all, :base => self.family_parent_dn, :scope => :one).select{|obj| obj.dn != self.dn }
end
def family_siblings_dn

Also available in: Unified diff