Sha256: 7c697825971efe419c5bf1b242d3ccc566d33f4e8a972b57d280ca65d89dc0ee

Contents?: true

Size: 717 Bytes

Versions: 8

Compression:

Stored size: 717 Bytes

Contents

module Actions
  module Katello
    module ContentView
      class Promote < Actions::EntryAction
        middleware.use Actions::Middleware::KeepCurrentUser

        def plan(version, environments, is_force = false, description = nil)
          action_subject(version.content_view)
          version.check_ready_to_promote!(environments)

          fail ::Katello::HttpErrors::BadRequest, _("Cannot promote environment out of sequence. Use force to bypass restriction.") if !is_force && !version.promotable?(environments)

          environments.each do |environment|
            plan_action(ContentView::PromoteToEnvironment, version, environment, description)
          end
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
katello-3.3.2 app/lib/actions/katello/content_view/promote.rb
katello-3.3.1.1 app/lib/actions/katello/content_view/promote.rb
katello-3.3.1 app/lib/actions/katello/content_view/promote.rb
katello-3.3.0.1 app/lib/actions/katello/content_view/promote.rb
katello-3.3.0 app/lib/actions/katello/content_view/promote.rb
katello-3.3.0.rc2 app/lib/actions/katello/content_view/promote.rb
katello-3.3.0.rc1.1 app/lib/actions/katello/content_view/promote.rb
katello-3.3.0.rc1 app/lib/actions/katello/content_view/promote.rb