]> git.parisson.com Git - teleforma.git/commitdiff
fix redir for non auth user from question
authorGuillaume Pellerin <yomguy@parisson.com>
Mon, 30 Dec 2013 23:57:28 +0000 (00:57 +0100)
committerGuillaume Pellerin <yomguy@parisson.com>
Mon, 30 Dec 2013 23:57:28 +0000 (00:57 +0100)
teleforma/views/pro.py

index 4f1ec5039f6baece0942823a9911caf976190dcc..b2a3e63bbfd0c0c6e9337691e4da8993dbb51cae 100644 (file)
@@ -108,7 +108,7 @@ class SeminarAccessMixin(object):
 
     def render_to_response(self, context):
         seminar = context['seminar']
-        if not seminar in all_seminars(self.request)['all_seminars']:
+        if not seminar in all_seminars(self.request)['all_seminars'] or not self.request.user.is_authenticated:
             messages.warning(self.request, _("You do NOT have access to this resource and then have been redirected to your desk."))
             return redirect('teleforma-desk')
         return super(SeminarAccessMixin, self).render_to_response(context)