def allowed?(name, ip)
      if name or ip
        # This is probably unnecessary, and can cause some weirdness in
        # cases where we're operating over localhost but don't have a real
        # IP defined.
        raise Puppet::DevError, _("Name and IP must be passed to 'allowed?'") unless name and ip
        # else, we're networked and such
      else
        # we're local
        return true
      end

      # yay insecure overrides
      return true if globalallow?

      if decl = declarations.find { |d| d.match?(name, ip) }
        return decl.result
      end

      info _("defaulting to no access for %{name}") % { name: name }
      false
    end
def allowed?(name, ip)
      if name or ip
        # This is probably unnecessary, and can cause some weirdness in
        # cases where we're operating over localhost but don't have a real
        # IP defined.
        raise Puppet::DevError, _("Name and IP must be passed to 'allowed?'") unless name and ip
        # else, we're networked and such
      else
        # we're local
        return true
      end

      # yay insecure overrides
      return true if globalallow?

      if decl = declarations.find { |d| d.match?(name, ip) }
        return decl.result
      end

      info _("defaulting to no access for %{name}") % { name: name }
      false
    end
Is a given combination of name and ip address allowed?  If either input
 is non-nil, then both inputs must be provided.  If neither input
 is provided, then the authstore is considered local and defaults to "true".