From: yomguy Date: Thu, 20 Dec 2012 14:40:02 +0000 (+0100) Subject: fix rights again X-Git-Tag: 0.9-probarreau~226 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=fe1b4ae5d098c7c868b46cca0c8706a5e26bc539;p=teleforma.git fix rights again --- 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()