Merge pull request #1638 from entantoencuanto/issue#1595-results_url_permissions

Issue#1595 results url permissions
This commit is contained in:
Raimond Garcia
2017-06-12 13:09:27 +02:00
committed by GitHub
3 changed files with 12 additions and 1 deletions

View File

@@ -4,6 +4,7 @@ module Budgets
load_and_authorize_resource :budget
def show
authorize! :read_results, @budget
@result = load_result
end

View File

@@ -17,6 +17,7 @@ module Abilities
can [:read], Budget
can [:read], Budget::Group
can [:read, :print], Budget::Investment
can :read_results, Budget, phase: "finished"
can :new, DirectMessage
can [:read, :debate, :draft_publication, :allegations, :final_version_publication], Legislation::Process
can [:read, :changes, :go_to_version], Legislation::DraftVersion