add bulk_management ability

This commit is contained in:
Ahmed Ejaz
2025-02-16 01:53:47 +05:00
parent d9308799b0
commit 3e71f8293c

View File

@@ -360,7 +360,7 @@ module Spree
order.variants.any? { |variant| user.enterprises.ids.include?(variant.supplier_id) }
end
can [:admin, :read, :index, :edit, :update], Spree::Order do |order|
can [:admin, :read, :index, :edit, :update, :bulk_management], Spree::Order do |order|
can_edit_order_lambda.call(order)
end
can [:admin, :index, :create, :destroy, :update], Spree::LineItem do |item|
@@ -370,6 +370,7 @@ module Spree
can_edit_order_lambda.call(shipment.order)
end
can [:visible], Enterprise
end
def add_relationship_management_abilities(user)