Sha256: 5c084c0dea142564a8bf4b3cdf9e9f51af4de078c66ce0f75e5602d0b19875b6

Contents?: true

Size: 1007 Bytes

Versions: 29

Compression:

Stored size: 1007 Bytes

Contents

module Actions
  module Katello
    module ContentView
      class RemoveVersion < Actions::EntryAction
        def plan(version)
          action_subject(version.content_view)
          version.validate_destroyable!

          history = ::Katello::ContentViewHistory.create!(:content_view_version => version,
                                                          :user => ::User.current.login,
                                                          :status => ::Katello::ContentViewHistory::IN_PROGRESS,
                                                          :task => self.task)

          plan_action(ContentViewVersion::Destroy, version)
          plan_self(history_id: history.id)
        end

        def finalize
          history = ::Katello::ContentViewHistory.find(input[:history_id])
          history.status = ::Katello::ContentViewHistory::SUCCESSFUL
          history.save!
        end

        def humanized_name
          _("Remove Version")
        end
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
katello-3.2.1.1 app/lib/actions/katello/content_view/remove_version.rb
katello-3.2.1 app/lib/actions/katello/content_view/remove_version.rb
katello-3.2.0 app/lib/actions/katello/content_view/remove_version.rb
katello-3.2.0.rc3 app/lib/actions/katello/content_view/remove_version.rb
katello-3.2.0.rc2 app/lib/actions/katello/content_view/remove_version.rb
katello-3.2.0.rc1.1 app/lib/actions/katello/content_view/remove_version.rb
katello-3.2.0.rc1 app/lib/actions/katello/content_view/remove_version.rb
katello-3.1.0.1 app/lib/actions/katello/content_view/remove_version.rb
katello-3.1.0 app/lib/actions/katello/content_view/remove_version.rb
katello-3.1.0.rc2.1 app/lib/actions/katello/content_view/remove_version.rb
katello-3.0.2 app/lib/actions/katello/content_view/remove_version.rb
katello-2.4.5 app/lib/actions/katello/content_view/remove_version.rb
katello-3.1.0.rc1 app/lib/actions/katello/content_view/remove_version.rb
katello-3.0.1 app/lib/actions/katello/content_view/remove_version.rb
katello-2.4.4 app/lib/actions/katello/content_view/remove_version.rb
katello-3.0.0 app/lib/actions/katello/content_view/remove_version.rb
katello-2.4.3 app/lib/actions/katello/content_view/remove_version.rb
katello-3.0.0.rc7 app/lib/actions/katello/content_view/remove_version.rb
katello-3.0.0.rc5 app/lib/actions/katello/content_view/remove_version.rb
katello-2.4.2 app/lib/actions/katello/content_view/remove_version.rb