changes admin/valuator permissions
not allowed to create/destroy spending proposals anymore
This commit is contained in:
@@ -37,7 +37,7 @@ module Abilities
|
||||
|
||||
can :manage, Annotation
|
||||
|
||||
can :manage, SpendingProposal
|
||||
can [:read, :update], SpendingProposal
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -3,7 +3,7 @@ module Abilities
|
||||
include CanCan::Ability
|
||||
|
||||
def initialize(user)
|
||||
can :manage, SpendingProposal
|
||||
can [:read, :update, :valuate], SpendingProposal
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -52,5 +52,7 @@ describe "Abilities::Administrator" do
|
||||
|
||||
it { should be_able_to(:manage, Annotation) }
|
||||
|
||||
it { should be_able_to(:manage, SpendingProposal) }
|
||||
it { should be_able_to(:read, SpendingProposal) }
|
||||
it { should be_able_to(:update, SpendingProposal) }
|
||||
it { should be_able_to(:valuate, SpendingProposal) }
|
||||
end
|
||||
|
||||
@@ -6,5 +6,7 @@ describe "Abilities::Valuator" do
|
||||
let(:user) { valuator.user }
|
||||
let(:valuator) { create(:valuator) }
|
||||
|
||||
it { should be_able_to(:manage, SpendingProposal) }
|
||||
it { should be_able_to(:read, SpendingProposal) }
|
||||
it { should be_able_to(:update, SpendingProposal) }
|
||||
it { should be_able_to(:valuate, SpendingProposal) }
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user