Revision ab983e7a
Added by Marc Dequènes about 15 years ago
- ID ab983e7a75cf9e623793550f80a8143956f47505
bin/shadowwalker | ||
---|---|---|
item_hdl = m[2]
|
||
|
||
if fetch_item
|
||
item = LdapShadows::Manipulation.find_item_by_full_handle($shadow, full_handle)
|
||
item = LdapShadows::Manipulation.find_item_by_full_handle($shadow, full_handle, $program_options[:admin])
|
||
[item.class, item]
|
||
else
|
||
obj_klass = params_shift_object_handle([obj_hdl])
|
lib/ldap_shadows/manipulation_helper.rb | ||
---|---|---|
res
|
||
end
|
||
|
||
def self.find_item_by_full_handle(shadow, full_handle)
|
||
def self.find_item_by_full_handle(shadow, full_handle, with_admin_fields = false)
|
||
if full_handle == "root"
|
||
raw_item_dn = ActiveLdap::Base.base.to_s
|
||
raw_item = ActiveLdap::Base.find(:first, :base => raw_item_dn, :scope => :base)
|
||
... | ... | |
obj_klass = shadow.get_object(obj_hdl)
|
||
raise PreProcessingError, _("No such object '%s'") % obj_hdl if obj_klass.nil?
|
||
|
||
attr_list = ["*"]
|
||
attr_list << "+" if with_admin_fields
|
||
|
||
begin
|
||
obj_klass.find(item_hdl, :attributes => [""])
|
||
obj_klass.find(item_hdl, :attributes => attr_list)
|
||
rescue ActiveLdap::EntryNotFound
|
||
raise PreProcessingError, _("No such item '%s/%s'") % [obj_klass.handle, item_hdl]
|
||
end
|
Also available in: Unified diff
[fix] corrected attributes not retrieved anymore