Sha256: 03ca823ccb3795ace7461f7dbfc627e9e2bdca4d2b4b483b4f3124aaaf212940
Contents?: true
Size: 1.1 KB
Versions: 224
Compression:
Stored size: 1.1 KB
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, :action => ::Katello::ContentViewHistory.actions[:removal], :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
224 entries across 224 versions & 1 rubygems