Revision 98217996
Added by Marc Dequènes about 14 years ago
- ID 9821799643b84c1515f3c342036686bd3a266f73
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
[evol] switched to a higher activeldap library (closes #27)