mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-26 01:33:22 +00:00
Adding controller actions and routes for pausing and unpausing a standing order
This commit is contained in:
@@ -253,7 +253,7 @@ class AbilityDecorator
|
||||
can [:create], Customer
|
||||
can [:admin, :index, :update, :destroy], Customer, enterprise_id: Enterprise.managed_by(user).pluck(:id)
|
||||
can [:admin, :new, :index], StandingOrder
|
||||
can [:create, :edit, :update, :cancel], StandingOrder do |standing_order|
|
||||
can [:create, :edit, :update, :cancel, :pause, :unpause], StandingOrder do |standing_order|
|
||||
user.enterprises.include?(standing_order.shop)
|
||||
end
|
||||
can [:admin, :build], StandingLineItem
|
||||
|
||||
Reference in New Issue
Block a user