Merge branch 'master' into polls

This commit is contained in:
Juanjo Bazán
2017-01-19 16:51:19 +01:00
254 changed files with 10658 additions and 871 deletions

View File

@@ -18,8 +18,6 @@ module Abilities
end
can [:retire_form, :retire], Proposal, author_id: user.id
can :read, SpendingProposal
can :create, Comment
can :create, Debate
can :create, Proposal
@@ -46,6 +44,12 @@ module Abilities
can :vote_featured, Proposal
can :vote, SpendingProposal
can :create, SpendingProposal
can :create, Budget::Investment, budget: { phase: "accepting" }
can :vote, Budget::Investment, budget: { phase: "selecting" }
can [:show, :create], Budget::Ballot, budget: { phase: "balloting" }
can [:create, :destroy], Budget::Ballot::Line, budget: { phase: "balloting" }
can :create, DirectMessage
can :show, DirectMessage, sender_id: user.id
can(:answer, Poll, Poll.answerable_by(user)){ |poll| poll.answerable_by?(user) }