adds admin permissions for investments

This commit is contained in:
kikito
2016-05-30 14:13:36 +02:00
parent 2a82e9e33a
commit 7005faabe6
2 changed files with 18 additions and 2 deletions

View File

@@ -4,7 +4,6 @@ module Abilities
def initialize(user)
self.merge Abilities::Moderation.new(user)
self.merge Abilities::Valuator.new(user)
can :restore, Comment
cannot :restore, Comment, hidden_at: nil
@@ -41,7 +40,12 @@ module Abilities
can :manage, Annotation
can [:read, :update, :destroy, :summary], SpendingProposal
can [:read, :update, :valuate, :destroy, :summary], SpendingProposal
can [:create, :update], Budget
can [:hide, :update], Budget::Investment
can :valuate, Budget::Investment, budget: { valuating: true }
can :create, Budget::ValuatorAssignment
end
end
end