Sha256: 7d68cacb906174a7e80c011241be2264adabce8d05ad34e3d19502af462c9ad6

Contents?: true

Size: 805 Bytes

Versions: 120

Compression:

Stored size: 805 Bytes

Contents

require_relative '../../../puppet/file_serving/metadata'
require_relative '../../../puppet/indirector/file_metadata'
require_relative '../../../puppet/indirector/code'
require_relative '../../../puppet/file_serving/terminus_selector'

class Puppet::Indirector::FileMetadata::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

120 entries across 120 versions & 1 rubygems

Version Path
puppet-7.34.0 lib/puppet/indirector/file_metadata/selector.rb
puppet-7.34.0-x86-mingw32 lib/puppet/indirector/file_metadata/selector.rb
puppet-7.34.0-x64-mingw32 lib/puppet/indirector/file_metadata/selector.rb
puppet-7.34.0-universal-darwin lib/puppet/indirector/file_metadata/selector.rb
puppet-7.33.0 lib/puppet/indirector/file_metadata/selector.rb
puppet-7.33.0-x86-mingw32 lib/puppet/indirector/file_metadata/selector.rb
puppet-7.33.0-x64-mingw32 lib/puppet/indirector/file_metadata/selector.rb
puppet-7.33.0-universal-darwin lib/puppet/indirector/file_metadata/selector.rb
puppet-7.32.1 lib/puppet/indirector/file_metadata/selector.rb
puppet-7.32.1-x86-mingw32 lib/puppet/indirector/file_metadata/selector.rb
puppet-7.32.1-x64-mingw32 lib/puppet/indirector/file_metadata/selector.rb
puppet-7.32.1-universal-darwin lib/puppet/indirector/file_metadata/selector.rb
puppet-7.31.0 lib/puppet/indirector/file_metadata/selector.rb
puppet-7.31.0-x86-mingw32 lib/puppet/indirector/file_metadata/selector.rb
puppet-7.31.0-x64-mingw32 lib/puppet/indirector/file_metadata/selector.rb
puppet-7.31.0-universal-darwin lib/puppet/indirector/file_metadata/selector.rb
puppet-7.30.0 lib/puppet/indirector/file_metadata/selector.rb
puppet-7.30.0-x86-mingw32 lib/puppet/indirector/file_metadata/selector.rb
puppet-7.30.0-x64-mingw32 lib/puppet/indirector/file_metadata/selector.rb
puppet-7.30.0-universal-darwin lib/puppet/indirector/file_metadata/selector.rb