From f38b755e62cbcd2d5bdc455bd9375a951299c134 Mon Sep 17 00:00:00 2001 From: Chaitanya Date: Sat, 22 Apr 2017 16:12:08 +0530 Subject: [PATCH] Don't allow not_signed_in user to view schedules if not marked as public in program --- app/controllers/schedules_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/schedules_controller.rb b/app/controllers/schedules_controller.rb index 5fdbeecd..96437520 100644 --- a/app/controllers/schedules_controller.rb +++ b/app/controllers/schedules_controller.rb @@ -1,9 +1,9 @@ class SchedulesController < ApplicationController - load_and_authorize_resource protect_from_forgery with: :null_session before_action :respond_to_options load_resource :conference, find_by: :short_title load_resource :program, through: :conference, singleton: true, except: :index + load_and_authorize_resource :selected_schedule, through: :program, singleton: true def show @rooms = @conference.venue.rooms if @conference.venue