From eaf771d83dad3ee108cba45550530e885f1c6ddc Mon Sep 17 00:00:00 2001 From: Fieloux Date: Tue, 18 Dec 2018 16:20:16 +0100 Subject: [PATCH] Add condition to show menu Add condition to show menu --- lib/solidus_stock_transfers/engine.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/solidus_stock_transfers/engine.rb b/lib/solidus_stock_transfers/engine.rb index 9e1a52a..3c52fab 100644 --- a/lib/solidus_stock_transfers/engine.rb +++ b/lib/solidus_stock_transfers/engine.rb @@ -17,6 +17,7 @@ class Engine < Rails::Engine config.menu_items.insert idx, config.class::MenuItem.new( [:stock_transfers], 'exchange', + condition: -> { can?(:admin, Spree::StockTransfer) }, url: :admin_stock_transfers_path ) end