mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Adding variant update permissions to Enterprise users
This commit is contained in:
@@ -14,7 +14,7 @@ class AbilityDecorator
|
||||
user.enterprises.include? product.supplier
|
||||
end
|
||||
|
||||
can [:admin, :index, :read, :create, :edit, :search], Spree::Variant
|
||||
can [:admin, :index, :read, :create, :edit, :update, :search], Spree::Variant
|
||||
can [:admin, :index, :read, :create, :edit], Spree::ProductProperty
|
||||
can [:admin, :index, :read, :create, :edit], Spree::Image
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ module Spree
|
||||
end
|
||||
|
||||
it "should be able to read/write their enterprises' product variants" do
|
||||
should have_ability([:admin, :index, :read, :create, :edit, :search], for: Spree::Variant)
|
||||
should have_ability([:admin, :index, :read, :create, :edit, :search, :update], for: Spree::Variant)
|
||||
end
|
||||
|
||||
it "should be able to read/write their enterprises' product properties" do
|
||||
|
||||
Reference in New Issue
Block a user