Sha256: 8c1afe8e1120f7038845c2faeae49e0474fa8e47f0d124eb02adc48dbec63452

Contents?: true

Size: 832 Bytes

Versions: 20

Compression:

Stored size: 832 Bytes

Contents

# frozen_string_literal: true
require_relative '../../../puppet/file_serving/content'
require_relative '../../../puppet/indirector/file_content'
require_relative '../../../puppet/indirector/code'
require_relative '../../../puppet/file_serving/terminus_selector'

class Puppet::Indirector::FileContent::Selector < Puppet::Indirector::Code
  desc "Select the terminus based on the request"
  include Puppet::FileServing::TerminusSelector

  def get_terminus(request)
    indirection.terminus(select(request))
  end

  def find(request)
    get_terminus(request).find(request)
  end

  def search(request)
    get_terminus(request).search(request)
  end

  def authorized?(request)
    terminus = get_terminus(request)
    if terminus.respond_to?(:authorized?)
      terminus.authorized?(request)
    else
      true
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
puppet-8.3.0 lib/puppet/indirector/file_content/selector.rb
puppet-8.3.0-x86-mingw32 lib/puppet/indirector/file_content/selector.rb
puppet-8.3.0-x64-mingw32 lib/puppet/indirector/file_content/selector.rb
puppet-8.3.0-universal-darwin lib/puppet/indirector/file_content/selector.rb
puppet-8.3.1 lib/puppet/indirector/file_content/selector.rb
puppet-8.3.1-x86-mingw32 lib/puppet/indirector/file_content/selector.rb
puppet-8.3.1-x64-mingw32 lib/puppet/indirector/file_content/selector.rb
puppet-8.3.1-universal-darwin lib/puppet/indirector/file_content/selector.rb
puppet-8.2.0 lib/puppet/indirector/file_content/selector.rb
puppet-8.2.0-x86-mingw32 lib/puppet/indirector/file_content/selector.rb
puppet-8.2.0-x64-mingw32 lib/puppet/indirector/file_content/selector.rb
puppet-8.2.0-universal-darwin lib/puppet/indirector/file_content/selector.rb
puppet-8.1.0 lib/puppet/indirector/file_content/selector.rb
puppet-8.1.0-x86-mingw32 lib/puppet/indirector/file_content/selector.rb
puppet-8.1.0-x64-mingw32 lib/puppet/indirector/file_content/selector.rb
puppet-8.1.0-universal-darwin lib/puppet/indirector/file_content/selector.rb
puppet-8.0.1 lib/puppet/indirector/file_content/selector.rb
puppet-8.0.1-x86-mingw32 lib/puppet/indirector/file_content/selector.rb
puppet-8.0.1-x64-mingw32 lib/puppet/indirector/file_content/selector.rb
puppet-8.0.1-universal-darwin lib/puppet/indirector/file_content/selector.rb