Sha256: 5844208cf6aabd75d26f925599f8c0fbc66b3c6b056f55030e4ecf7199776ddb

Contents?: true

Size: 660 Bytes

Versions: 248

Compression:

Stored size: 660 Bytes

Contents

module Actions
  module Katello
    module Provider
      class Destroy < Actions::EntryAction
        def plan(provider, check_products = true)
          fail _("Red Hat provider can not be deleted") if !provider.being_deleted? && provider.redhat_provider?
          fail _("Cannot delete provider with attached products") if check_products && !provider.products.empty?
          action_subject(provider)

          plan_self
        end

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

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

Version data entries

248 entries across 248 versions & 1 rubygems

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