From dce096a56e857f77fdc0e20931a7d77c90d798dc Mon Sep 17 00:00:00 2001 From: Mohamed ABDELLANI Date: Mon, 7 Aug 2023 15:48:36 +0100 Subject: [PATCH] check if invoices feature is enabled for the current user before showing invoices tab --- app/views/spree/admin/shared/_order_tabs.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/spree/admin/shared/_order_tabs.html.haml b/app/views/spree/admin/shared/_order_tabs.html.haml index 1c89c24f1f..7072f84b13 100644 --- a/app/views/spree/admin/shared/_order_tabs.html.haml +++ b/app/views/spree/admin/shared/_order_tabs.html.haml @@ -61,7 +61,7 @@ %li{ class: adjustments_classes } = link_to_with_icon 'icon-cogs', t(:adjustments), spree.admin_order_adjustments_url(@order) - - if feature?(:invoices) && @order.can_show_invoice? + - if feature?(:invoices, spree_current_user) && @order.can_show_invoice? - invoices_classes = "active" if current == 'Invoices' %li{ class: invoices_classes } = link_to_with_icon 'icon-cogs', t(:invoices), spree.admin_order_invoices_url(@order)