Project

General

Profile

« Previous | Next » 

Revision 5c716bdc

Added by Marc Dequènes over 14 years ago

  • ID 5c716bdcdb2bb90a41d9816301fc71117b4ca3c4

[evol] shrinked ActiveLdap fixes (but now requires version 1.2.2)

View differences:

lib/ldap_shadows/activeldap_fixes.rb
end
end
end
# Duck: quick fix for #27429
def validate_excluded_classes
return if self.class.excluded_classes.empty?
current_objectclasses = self.classes.collect {|name| name.downcase }
unexpected_classes = self.class.excluded_classes.select do |name|
current_objectclasses.include? name.downcase
end
return if unexpected_classes.empty?
names = unexpected_classes.collect do |object_class|
self.class.human_object_class_name(object_class)
end
format = n_("%{fn} has excluded value: %s",
"%{fn} has excluded values: %s",
names.size)
format = format.sub(/^%\{fn\} /, '') unless ActiveLdap.get_text_supported?
errors.add("objectClass", format % names.join(", "))
end
# Duck: new method, should be hooked somewhere
def load_initial_attribute_list
@initial_attribute_list ||= self.nonempty_attributes
end

Also available in: Unified diff