From fe1b4ae5d098c7c868b46cca0c8706a5e26bc539 Mon Sep 17 00:00:00 2001 From: yomguy Date: Thu, 20 Dec 2012 15:40:02 +0100 Subject: [PATCH] fix rights again --- teleforma/views/pro.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/teleforma/views/pro.py b/teleforma/views/pro.py index 609c132a..f6c184eb 100644 --- a/teleforma/views/pro.py +++ b/teleforma/views/pro.py @@ -105,7 +105,7 @@ def get_seminars(user): professor = user.professor.get() seminars = professor.seminars.all() - elif auditor: + elif auditor and not (user.is_staff or user.is_superuser): auditor = user.auditor.get() s_seminars = auditor.seminars.all() @@ -149,7 +149,7 @@ def total_progress(user): progress = 0 auditor = user.auditor.all() - if auditor: + if auditor and not (user.is_staff or user.is_superuser): seminars = auditor[0].seminars.all() elif user.is_superuser or user.is_staff: seminars = Seminar.objects.all() -- 2.39.5