From 251f9ea2809ae16fa676f04a6029bd29778237cb Mon Sep 17 00:00:00 2001 From: Martey Dodoo Date: Tue, 15 Mar 2016 12:08:58 -0400 Subject: [PATCH] Show unpublished conference schedule to staff. This is an addendum to #123 to allow the `schedule_conference` view to show unpublished conference schedules to staff members. --- symposion/schedule/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/symposion/schedule/views.py b/symposion/schedule/views.py index 0ff3903f..9c6d7c57 100644 --- a/symposion/schedule/views.py +++ b/symposion/schedule/views.py @@ -34,7 +34,10 @@ def fetch_schedule(slug): def schedule_conference(request): - schedules = Schedule.objects.filter(published=True, hidden=False) + if request.user.is_staff: + schedules = Schedule.objects.filter(hidden=False) + else: + schedules = Schedule.objects.filter(published=True, hidden=False) sections = [] for schedule in schedules: