Project

General

Profile

« Previous | Next » 

Revision 84bedafb

Added by Marc Dequènes over 14 years ago

  • ID 84bedafb1952f147204135d67b68480087a1fcfa

[workaround] added fix for activeldap#28433

View differences:

lib/ldap_shadows/activeldap_fixes.rb
public :escape_filter_value
end
end
# fix for activeldap#28433
class Base
def set_attribute(name, value)
real_name = to_real_attribute_name(name)
_dn_attribute = nil
valid_dn_attribute = true
begin
_dn_attribute = dn_attribute
rescue DistinguishedNameInvalid
valid_dn_attribute = false
end
if valid_dn_attribute and real_name == _dn_attribute
if value.is_a? Array
value = "#{value.first},#{dn.parent.to_s}"
end
real_name, value = register_new_dn_attribute(real_name, value)
end
raise UnknownAttribute.new(name) if real_name.nil?
@data[real_name] = value
@simplified_data = nil
@dn = compute_dn if real_name == _dn_attribute
end
end
end

Also available in: Unified diff