From 1efaf31a907aa42fc0b01029d332f539b2067a75 Mon Sep 17 00:00:00 2001 From: Aurélien Bompard Date: Fri, 7 Dec 2012 12:05:04 +0100 Subject: Factorize the add_tag and like JS functions --- hyperkitty/views/thread.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'hyperkitty/views/thread.py') diff --git a/hyperkitty/views/thread.py b/hyperkitty/views/thread.py index 4edd7f7..ec5a60f 100644 --- a/hyperkitty/views/thread.py +++ b/hyperkitty/views/thread.py @@ -124,9 +124,11 @@ def thread_index(request, mlist_fqdn, threadid): return HttpResponse(t.render(c)) -@login_required def add_tag(request, mlist_fqdn, email_id): """ Add a tag to a given thread. """ + if not request.user.is_authenticated(): + return HttpResponse('You must be logged in to add a tag', + content_type="text/plain", status=403) if request.method == 'POST': form = AddTagForm(request.POST) -- cgit