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
|
|
@ -33,10 +33,6 @@ class Ability
|
|||
can [:show], Conference do |conference|
|
||||
conference.splashpage && conference.splashpage.public == true
|
||||
end
|
||||
# Can view the schedule
|
||||
can [:schedule, :events], Conference do |conference|
|
||||
conference.program.cfp && conference.program.schedule_public
|
||||
end
|
||||
|
||||
can :show, Event do |event|
|
||||
event.state == 'confirmed'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue