def merge_configuration(user_configuration, target=self)
configuration = default_configuration
prepare_configuration(user_configuration).each do |key, value|
case key
when :base
target.base = value.gsub(/['}{#]/, '')
when :scope, :ldap_scope
if key == :ldap_scope
message = _(":ldap_scope configuration option is deprecated. " \
"Use :scope instead.")
ActiveSupport::Deprecation.warn(message)
end
target.scope = value
configuration[:scope] = value
else
configuration[key] = value
end
end
configuration
end