Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Allow setting private wishlist + allow wishlist to be shown to none signed up users.

Matthew Kennedy7bfddd0c10bb
diff --git a/api/app/controllers/spree/api/v2/storefront/wishlists_controller.rb b/api/app/controllers/spree/api/v2/storefront/wishlists_controller.rb
index 533faa22f5..3f6421b3f4 100644
--- a/api/app/controllers/spree/api/v2/storefront/wishlists_controller.rb
+++ b/api/app/controllers/spree/api/v2/storefront/wishlists_controller.rb
@@ -112,6 +112,8 @@ module Spree
def resource
@resource ||= current_store.wishlists.find_by!(token: params[:id])
+
+ return @resource if @resource.can_be_read_by?(spree_current_user)
end
def resource_serializer