Adds permissions for authors to destroy budget investments

This commit is contained in:
kikito
2017-03-06 13:42:52 +01:00
parent ff4c72aaae
commit 24920e73f6
2 changed files with 17 additions and 0 deletions

View File

@@ -46,6 +46,7 @@ module Abilities
can :create, SpendingProposal
can :create, Budget::Investment, budget: { phase: "accepting" }
can :destroy, Budget::Investment, budget: { phase: ["accepting", "reviewing"] }, author_id: user.id
can :vote, Budget::Investment, budget: { phase: "selecting" }
can [:show, :create], Budget::Ballot, budget: { phase: "balloting" }
can [:create, :destroy], Budget::Ballot::Line, budget: { phase: "balloting" }