Sha256: ac0131d0fbb6282c45b857f467176354932363bac96eae10fd86ec9b860b1f88

Contents?: true

Size: 564 Bytes

Versions: 103

Compression:

Stored size: 564 Bytes

Contents

module Katello
  module Concerns
    module WidgetExtensions
      extend ActiveSupport::Concern

      module ClassMethods
        SUBSCRIPTION_TEMPLATES = %w[subscription_status_widget subscription_widget].freeze

        def without_subscription_widgets
          where.not(template: ::Widget.singleton_class::SUBSCRIPTION_TEMPLATES)
        end

        def available
          if Organization.current&.simple_content_access?
            super.without_subscription_widgets
          else
            super
          end
        end
      end
    end
  end
end

Version data entries

103 entries across 103 versions & 1 rubygems

Version Path
katello-4.11.1 app/models/katello/concerns/widget_extensions.rb
katello-4.11.0 app/models/katello/concerns/widget_extensions.rb
katello-4.11.0.rc2 app/models/katello/concerns/widget_extensions.rb
katello-4.11.0.rc1 app/models/katello/concerns/widget_extensions.rb
katello-4.10.0 app/models/katello/concerns/widget_extensions.rb
katello-4.9.2 app/models/katello/concerns/widget_extensions.rb
katello-4.10.0.rc2 app/models/katello/concerns/widget_extensions.rb
katello-4.10.0.rc1 app/models/katello/concerns/widget_extensions.rb
katello-4.8.4 app/models/katello/concerns/widget_extensions.rb
katello-4.9.1 app/models/katello/concerns/widget_extensions.rb
katello-4.8.3 app/models/katello/concerns/widget_extensions.rb
katello-4.9.0 app/models/katello/concerns/widget_extensions.rb
katello-4.7.6 app/models/katello/concerns/widget_extensions.rb
katello-4.8.2 app/models/katello/concerns/widget_extensions.rb
katello-4.9.0.rc2 app/models/katello/concerns/widget_extensions.rb
katello-4.9.0.rc1 app/models/katello/concerns/widget_extensions.rb
katello-4.8.1 app/models/katello/concerns/widget_extensions.rb
katello-4.7.5 app/models/katello/concerns/widget_extensions.rb
katello-4.8.0 app/models/katello/concerns/widget_extensions.rb
katello-4.8.0.rc2 app/models/katello/concerns/widget_extensions.rb