integrates cancan with budgets

This commit is contained in:
rgarcia
2016-07-19 14:41:55 +02:00
parent e0e5068c87
commit 85d9dd4b84
3 changed files with 4 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
module Budgets
class BudgetsController < ApplicationController
skip_authorization_check
load_and_authorize_resource
def index
end

View File

@@ -10,6 +10,7 @@ module Abilities
can :read, Legislation
can :read, User
can [:search, :read], Annotation
can [:read], Budget
end
end
end

View File

@@ -26,4 +26,6 @@ describe "Abilities::Everyone" do
it { should be_able_to(:index, SpendingProposal) }
it { should_not be_able_to(:create, SpendingProposal) }
it { should be_able_to(:index, Budget) }
end