integrates cancan with budgets
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
module Budgets
|
||||
class BudgetsController < ApplicationController
|
||||
skip_authorization_check
|
||||
load_and_authorize_resource
|
||||
|
||||
def index
|
||||
end
|
||||
|
||||
@@ -10,6 +10,7 @@ module Abilities
|
||||
can :read, Legislation
|
||||
can :read, User
|
||||
can [:search, :read], Annotation
|
||||
can [:read], Budget
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user