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.

Use new simplified permissions check for reset action.

Matthew Kennedydc05960a0dbc
diff --git a/api/app/controllers/spree/api/v2/platform/digital_links_controller.rb b/api/app/controllers/spree/api/v2/platform/digital_links_controller.rb
index faa255f479..f17b293fd6 100644
--- a/api/app/controllers/spree/api/v2/platform/digital_links_controller.rb
+++ b/api/app/controllers/spree/api/v2/platform/digital_links_controller.rb
@@ -3,8 +3,6 @@ module Spree
module V2
module Platform
class DigitalLinksController < ResourceController
- before_action -> { doorkeeper_authorize! :write, :admin }, only: WRITE_ACTIONS << :reset
-
def reset
spree_authorize! :update, @digital_link if spree_current_user.present?