Sha256: 9a0f6da68eee4dfb6dee37e9f2a4c1abe6b52efc31ff2cd9dff5379f81c6d329

Contents?: true

Size: 1.05 KB

Versions: 9

Compression:

Stored size: 1.05 KB

Contents

object @resource
@resource ||= @object

extends "katello/api/v2/products/base"

extends 'katello/api/v2/common/org_reference'

attributes :productContent => :product_content

attributes :available_content => :available_content

child :library_repositories => :repositories do |_repo|
  attributes :name, :id
end

node(:gpg_key, :unless => lambda { |product| product.gpg_key.nil? }) do |product|
  {:id => product.gpg_key.id, :name => product.gpg_key.name}
end

child :provider do
  attribute :name
end

node :permissions do |product|
  {
    :view_products => product.readable?,
    :edit_products => product.editable?,
    :destroy_products => product.deletable?,
    :sync_products => product.syncable?
  }
end

node(:published_content_view_ids) do |product|
  product.published_content_views.map(&:id).uniq
end

node :redhat do |product|
  product.redhat?
end

node :permissions do |product|
  {
    :destroy_products => product.editable?,
    :edit_products => product.deletable?,
    :sync_products => product.syncable?
  }
end

extends 'katello/api/v2/common/timestamps'

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
katello-3.0.2 app/views/katello/api/v2/products/show.json.rabl
katello-3.0.1 app/views/katello/api/v2/products/show.json.rabl
katello-3.0.0 app/views/katello/api/v2/products/show.json.rabl
katello-3.0.0.rc7 app/views/katello/api/v2/products/show.json.rabl
katello-3.0.0.rc5 app/views/katello/api/v2/products/show.json.rabl
katello-3.0.0.rc4 app/views/katello/api/v2/products/show.json.rabl
katello-3.0.0.rc3 app/views/katello/api/v2/products/show.json.rabl
katello-3.0.0.rc2 app/views/katello/api/v2/products/show.json.rabl
katello-3.0.0.rc1 app/views/katello/api/v2/products/show.json.rabl