mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Remove reference to params[:token] in Admin::Orders::CustomerDetailsController
params[:token] and session[:access_token] are only really used in the context of guest users in the customer-facing parts of the app. Here the user should be fully authenticated already to view the page. There aren't any URL that point at this controller which append a token to the params.
This commit is contained in:
@@ -75,14 +75,10 @@ module Spree
|
||||
end
|
||||
|
||||
def check_authorization
|
||||
load_order
|
||||
session[:access_token] ||= params[:token]
|
||||
|
||||
resource = @order
|
||||
action = params[:action].to_sym
|
||||
action = :edit if action == :show # show route renders :edit for this controller
|
||||
|
||||
authorize! action, resource, session[:access_token]
|
||||
authorize! action, @order
|
||||
end
|
||||
|
||||
def set_guest_checkout_status
|
||||
|
||||
Reference in New Issue
Block a user