Commit 7a39ffc0 authored by Michal Čihař's avatar Michal Čihař

Only logged in users can manage suggestions

parent da183ed7
......@@ -120,6 +120,9 @@ def translate(request, project, subproject, lang):
# Handle suggestions
if 'accept' in request.GET or 'delete' in request.GET:
if not request.user.is_authenticated():
messages.add_message(request, messages.ERROR, _('You need to login to be able to manage suggestions!'))
return HttpResponseRedirect('%s?type=%s&oldpos=%d&dir=stay' % (obj.get_translate_url(), rqtype, pos))
if 'accept' in request.GET:
sugid = request.GET['accept']
else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment