adds explicit permission to admin to read budgets

This commit is contained in:
Juanjo Bazán
2016-07-29 13:39:08 +02:00
parent 6fce9df451
commit 49bc6533e8
2 changed files with 3 additions and 1 deletions

View File

@@ -2,6 +2,8 @@ class Admin::BudgetsController < Admin::BaseController
has_filters %w{open finished}, only: :index
load_and_authorize_resource
def index
@budgets = Budget.send(@current_filter).order(created_at: :desc).page(params[:page])
end

View File

@@ -42,7 +42,7 @@ module Abilities
can [:read, :update, :valuate, :destroy, :summary], SpendingProposal
can [:create, :update], Budget
can [:read, :create, :update], Budget
can [:hide, :update], Budget::Investment
can :valuate, Budget::Investment, budget: { valuating: true }
can :create, Budget::ValuatorAssignment