Refactor authorization for schedule action of Conferences Controller
Remove can ability for schedule and events action in ability.rb as both the actions are no longer present in conferences_controller. Replace load_and_authorize_resource with load_resource for program in the schedules_controller. Closes #1457
This commit is contained in:
parent
1c38b091cc
commit
41ae0279b8
2 changed files with 1 additions and 5 deletions
|
|
@ -3,7 +3,7 @@ module Admin
|
|||
# By authorizing 'conference' resource, we can ensure there will be no unauthorized access to
|
||||
# the schedule of a conference, which should not be accessed in the first place
|
||||
load_and_authorize_resource :conference, find_by: :short_title
|
||||
load_and_authorize_resource :program, through: :conference, singleton: true
|
||||
load_resource :program, through: :conference, singleton: true
|
||||
load_and_authorize_resource :schedule, through: :program
|
||||
load_resource :event_schedules, through: :schedule
|
||||
load_resource :selected_schedule, through: :program, singleton: true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue