Project

General

Profile

« Previous | Next » 

Revision e99088e1

Added by Marc Dequènes over 14 years ago

  • ID e99088e17aa3215f10e0f4593292e6c874329b69

[evol] allow specifying a DN using an item full handle in create/modify command

View differences:

lib/ldap_shadows/elements/object.rb
rescue
raise PreProcessingError, _("The file for the binary field '%s' cannot be read: ") % [field, $!]
end
elsif attr_info.syntax.to_param == "1.3.6.1.4.1.1466.115.121.1.12"
if val =~ /([a-zA-Z]+)\/([a-zA-Z]+)/
obj_hdl = $1.downcase
item_hdl = $2
obj_klass = self.class.shadow.get_object(obj_hdl)
raise PreProcessingError, _("No such object '%s'") % obj_hdl if obj_klass.nil?
begin
item = obj_klass.find(item_hdl, :attributes => [''])
rescue ActiveLdap::EntryNotFound
raise PreProcessingError, _("No such item '%s/%s'") % [obj_klass.handle, item_hdl]
end
val = item.dn
end
end
old_val = self.send(field, true)

Also available in: Unified diff