Adding variant update permissions to Enterprise users

This commit is contained in:
Will Marshall
2013-11-14 11:53:14 +11:00
parent 9097246301
commit 2ce687fc79
2 changed files with 2 additions and 2 deletions

View File

@@ -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

View File

@@ -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