mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-13 23:37:47 +00:00
check if invoices feature is enabled for the current user before printing a single invoice
This commit is contained in:
committed by
Konrad
parent
944925eb06
commit
bd2a1b3e22
@@ -99,7 +99,7 @@ module Spree
|
||||
end
|
||||
|
||||
def print
|
||||
if OpenFoodNetwork::FeatureToggle.enabled?(:invoices)
|
||||
if OpenFoodNetwork::FeatureToggle.enabled?(:invoices, spree_current_user)
|
||||
@order = @order.invoices.find(params[:invoice_id]).presenter
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user