diff --git a/app/controllers/spree/api/products_controller.rb b/app/controllers/spree/api/products_controller.rb index b8d7f81a44..dacd6b6948 100644 --- a/app/controllers/spree/api/products_controller.rb +++ b/app/controllers/spree/api/products_controller.rb @@ -2,9 +2,11 @@ require 'open_food_network/permissions' module Spree module Api - class ProductsController < Spree::Api::BaseController + class ProductsController < ::Api::BaseController respond_to :json + skip_authorization_check only: [:show] + def show @product = find_product(params[:id]) render json: @product, serializer: ::Api::Admin::ProductSerializer