Project

General

Profile

« Previous | Next » 

Revision a6211f2e

Added by Marc Dequènes over 14 years ago

  • ID a6211f2ec06047d432f49873fc37194da1b2fe50

[fix] reindent

View differences:

lib/ldap_shadows/activeldap_fixes.rb
# Duck: quick fix for #27429
def validate_excluded_classes
return if self.class.excluded_classes.empty?
return if self.class.excluded_classes.empty?
current_objectclasses = self.classes.collect {|name| name.downcase }
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?
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)
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
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

Also available in: Unified diff