mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
move reports abilitiy to can manage products block, producers need to use this too
This commit is contained in:
@@ -79,6 +79,8 @@ class AbilityDecorator
|
||||
can [:admin, :index, :read, :search], Spree::Taxon
|
||||
can [:admin, :index, :read, :create, :edit], Spree::Classification
|
||||
|
||||
# Reports page
|
||||
can [:admin, :index, :customers, :orders_and_distributors, :group_buys, :bulk_coop, :payments, :orders_and_fulfillment, :products_and_inventory], :report
|
||||
end
|
||||
|
||||
def add_order_management_abilities(user)
|
||||
@@ -118,8 +120,6 @@ class AbilityDecorator
|
||||
(user.enterprises & shipping_method.distributors).any?
|
||||
end
|
||||
|
||||
# Reports page
|
||||
can [:admin, :index, :customers, :orders_and_distributors, :group_buys, :bulk_coop, :payments, :orders_and_fulfillment, :products_and_inventory], :report
|
||||
end
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user