Add cancancan to SDG content

Only allow access to the SDG content section to administrators and sdg managers
This commit is contained in:
taitus
2020-11-25 15:00:01 +01:00
committed by Javi Martín
parent 65d6282b51
commit fb5965fe63
14 changed files with 52 additions and 5 deletions

View File

@@ -1,5 +1,7 @@
class SDGManagement::GoalsController < SDGManagement::BaseController
load_and_authorize_resource class: "SDG::Goal"
def index
@goals = SDG::Goal.order(:code)
@goals = @goals.order(:code)
end
end