From: Guillaume Pellerin Date: Mon, 30 Dec 2013 23:57:28 +0000 (+0100) Subject: fix redir for non auth user from question X-Git-Tag: 2.8.1-pro~350 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=09ae8bfdd31c5a77e7ffe68956d19372a15dbfa5;p=teleforma.git fix redir for non auth user from question --- diff --git a/teleforma/views/pro.py b/teleforma/views/pro.py index 4f1ec503..b2a3e63b 100644 --- a/teleforma/views/pro.py +++ b/teleforma/views/pro.py @@ -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)