Adding destroy ability to enterprise users

This commit is contained in:
Will Marshall
2013-12-13 15:05:07 +11:00
parent 92b3d496a4
commit f6af9e78ac
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, :update, :search], Spree::Variant
can [:admin, :index, :read, :create, :edit, :update, :search, :destroy], 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, :update], for: Spree::Variant)
should have_ability([:admin, :index, :read, :create, :edit, :search, :update, :destroy], for: Spree::Variant)
end
it "should be able to read/write their enterprises' product properties" do