adds permissions with cancan for new, create and show

This commit is contained in:
rgarcia
2016-06-08 13:46:17 +02:00
parent 21c2220626
commit 0e86cd89d6
3 changed files with 26 additions and 7 deletions

View File

@@ -48,9 +48,12 @@ module Abilities
can :create, SpendingProposal
end
can [:new, :create, :show], ProposalNotification do |notification|
notification.proposal.author_id == user.id
end
can :create, Annotation
can [:update, :destroy], Annotation, user_id: user.id
end
end
end