module Eco module API class MicroCases # When trying to find an `person` with given a source `entry`, it states if such a search should be `strict` or `soft`. # @note # - `strict` searches ignore the email when the source `entry` has an `external_id` specified. # - see related command line options `-search-strict` and `-search-soft` # @param options [Hash] the options. # @return [Boolean] `true` if the search should be `strict` only, and `false` otherwise. def strict_search?(options) strict_config = session.config.people.strict_search? strict_option = options.dig(:search, :strict) soft_option = options.dig(:search, :soft) && !strict_option (strict_config || strict_option) && !soft_option end end end end