Revision 822a42a2
Added by Marc Dequènes about 15 years ago
- ID 822a42a22fa710dfe32b2492168085bfe6ffc349
lib/ldap_shadows/activeldap_fixes.rb | ||
---|---|---|
end
|
||
end
|
||
|
||
# unfinished workaround for activeldap#26720 (not sure it would work in all cases)
|
||
module Validations
|
||
# unfinished workaround for activeldap#26720 (not sure it would work in all cases)
|
||
def validate_required_ldap_values
|
||
_schema = nil
|
||
# Make sure all MUST attributes have a value
|
||
... | ... | |
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
|
Also available in: Unified diff
[fix] added fix for upstream bug #27429