From d5d3a59ac98bf70d774bdc591d1145e369157643 Mon Sep 17 00:00:00 2001 From: Bernhard Suttner Date: Wed, 20 Sep 2023 08:53:41 +0200 Subject: [PATCH] The org-id is implicitly set by setting the scc-account-id. --- app/controllers/api/v2/scc_products_controller.rb | 1 - app/views/api/v2/scc_products/main.json.rabl | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/controllers/api/v2/scc_products_controller.rb b/app/controllers/api/v2/scc_products_controller.rb index 585dbdf8..21f42f04 100644 --- a/app/controllers/api/v2/scc_products_controller.rb +++ b/app/controllers/api/v2/scc_products_controller.rb @@ -28,7 +28,6 @@ def metadata_subtotal def index scope = resource_scope scope = scope.where.not(:product_id => nil) if ::Foreman::Cast.to_bool(params[:subscribed_only]) - scope = scope.where(:organization => params[:organization_id]) if params[:organization_id].present? @scc_products = scope.search_for(params[:search], :order => params[:order]).paginate(:page => params[:page]) end diff --git a/app/views/api/v2/scc_products/main.json.rabl b/app/views/api/v2/scc_products/main.json.rabl index fb7145f8..1edf3086 100644 --- a/app/views/api/v2/scc_products/main.json.rabl +++ b/app/views/api/v2/scc_products/main.json.rabl @@ -2,4 +2,4 @@ object @scc_product extends 'api/v2/scc_products/base' -attributes :organization_id, :organization_name, :scc_account_id, :name, :arch, :friendly_name, :description, :product_id +attributes :scc_account_id, :name, :arch, :friendly_name, :description, :product_id