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.7.4 app/models/katello/concerns/widget_extensions.rb
katello-4.8.0.rc1 app/models/katello/concerns/widget_extensions.rb
katello-4.7.3 app/models/katello/concerns/widget_extensions.rb
katello-4.7.2 app/models/katello/concerns/widget_extensions.rb
katello-4.7.1 app/models/katello/concerns/widget_extensions.rb
katello-4.6.2.1 app/models/katello/concerns/widget_extensions.rb
katello-4.6.2 app/models/katello/concerns/widget_extensions.rb
katello-4.7.0 app/models/katello/concerns/widget_extensions.rb
katello-4.6.1 app/models/katello/concerns/widget_extensions.rb
katello-4.7.0.rc2 app/models/katello/concerns/widget_extensions.rb
katello-4.7.0.rc1 app/models/katello/concerns/widget_extensions.rb
katello-4.4.2.2 app/models/katello/concerns/widget_extensions.rb
katello-4.4.2.1 app/models/katello/concerns/widget_extensions.rb
katello-4.4.2 app/models/katello/concerns/widget_extensions.rb
katello-4.5.1 app/models/katello/concerns/widget_extensions.rb
katello-4.6.0 app/models/katello/concerns/widget_extensions.rb
katello-4.6.0.rc2 app/models/katello/concerns/widget_extensions.rb
katello-4.6.0.rc1 app/models/katello/concerns/widget_extensions.rb
katello-4.5.0 app/models/katello/concerns/widget_extensions.rb
katello-4.5.0.rc2 app/models/katello/concerns/widget_extensions.rb