app/controllers/spree/api/shipments_controller.rb in solidus_api-1.1.4 vs app/controllers/spree/api/shipments_controller.rb in solidus_api-1.2.0.beta1

- old
+ new

@@ -114,14 +114,15 @@ end end def find_shipment if @order.present? - @shipment = @order.shipments.accessible_by(current_ability, :update).find_by!(number: params[:id]) + @shipment = @order.shipments.find_by!(number: params[:id]) else - @shipment = Spree::Shipment.accessible_by(current_ability, :update).readonly(false).find_by!(number: params[:id]) + @shipment = Spree::Shipment.readonly(false).find_by!(number: params[:id]) @order = @shipment.order end + authorize! :update, @shipment end def update_shipment @shipment.update_attributes(shipment_params) @shipment.reload