Sha256: 50c2271829a07abf704a575171bc312c5ed1f57b28d90d2d0f44bd8902c215db

Contents?: true

Size: 730 Bytes

Versions: 46

Compression:

Stored size: 730 Bytes

Contents

module Actions
  module Katello
    module ActivationKey
      class Destroy < Actions::EntryAction
        def plan(activation_key, options = {})
          activation_key.validate_destroyable!
          skip_candlepin = options.fetch(:skip_candlepin, false)
          action_subject(activation_key)

          plan_action(Candlepin::ActivationKey::Destroy, cp_id: activation_key.cp_id) if !skip_candlepin && activation_key.cp_id.present?
          plan_self
        end

        def finalize
          activation_key = ::Katello::ActivationKey.find(input[:activation_key][:id])
          activation_key.destroy!
        end

        def humanized_name
          _("Delete Activation Key")
        end
      end
    end
  end
end

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
katello-4.14.2 app/lib/actions/katello/activation_key/destroy.rb
katello-4.15.0 app/lib/actions/katello/activation_key/destroy.rb
katello-4.15.0.rc2 app/lib/actions/katello/activation_key/destroy.rb
katello-4.15.0.rc1 app/lib/actions/katello/activation_key/destroy.rb
katello-4.14.1 app/lib/actions/katello/activation_key/destroy.rb
katello-4.14.0 app/lib/actions/katello/activation_key/destroy.rb
katello-4.14.0.rc3 app/lib/actions/katello/activation_key/destroy.rb
katello-4.14.0.rc2 app/lib/actions/katello/activation_key/destroy.rb
katello-4.14.0.rc1.1 app/lib/actions/katello/activation_key/destroy.rb
katello-4.14.0.rc1 app/lib/actions/katello/activation_key/destroy.rb
katello-4.13.1 app/lib/actions/katello/activation_key/destroy.rb
katello-4.13.0 app/lib/actions/katello/activation_key/destroy.rb
katello-4.12.1 app/lib/actions/katello/activation_key/destroy.rb
katello-4.13.0.rc1 app/lib/actions/katello/activation_key/destroy.rb
katello-4.12.0 app/lib/actions/katello/activation_key/destroy.rb
katello-4.12.0.rc3 app/lib/actions/katello/activation_key/destroy.rb
katello-4.12.0.rc2 app/lib/actions/katello/activation_key/destroy.rb
katello-4.12.0.rc1 app/lib/actions/katello/activation_key/destroy.rb
katello-4.11.1 app/lib/actions/katello/activation_key/destroy.rb
katello-4.11.0 app/lib/actions/katello/activation_key/destroy.rb