From d3c03e0529a76d151f55c8b50c17c1829b3f52a7 Mon Sep 17 00:00:00 2001 From: Sanj Date: Mon, 11 Jul 2011 03:28:48 +0530 Subject: [PATCH] small fixes --- edgware/editor/views.py | 3 +++ edgware/files/views.py | 5 ++++- edgware/templates/main/publish.html | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/edgware/editor/views.py b/edgware/editor/views.py index 89a2833..df77e06 100644 --- a/edgware/editor/views.py +++ b/edgware/editor/views.py @@ -835,6 +835,9 @@ def product_list(request): return render_to_response("product_list.html", {'products': products}) def article_list(request): + user = request.user + if not user.is_superuser: + return HttpResponse("authentication error.") articles = Article.objects.all() return render_to_response("article_list.html", {'articles': articles}) diff --git a/edgware/files/views.py b/edgware/files/views.py index 5897ed9..73c8f16 100644 --- a/edgware/files/views.py +++ b/edgware/files/views.py @@ -328,11 +328,14 @@ def moveFiles(request): files = json.loads(request.POST.get("ids", "[]")) study_id = int(request.POST.get("study", "0")) study = Category.objects.get(pk=study_id) + response['status'] = 'pass' for f in files: fil = File.objects.get(pk=f) if fil.can_edit(user): fil.move_to(study) - response['status'] = 'pass' + else: + response['status'] = 'fail' + response['error'] = 'one or more files could not be moved as you did not have permission to move them.' return render_to_json_response(response) diff --git a/edgware/templates/main/publish.html b/edgware/templates/main/publish.html index ec1c166..8932810 100644 --- a/edgware/templates/main/publish.html +++ b/edgware/templates/main/publish.html @@ -48,7 +48,7 @@ To use the tool, you have to be logged in. To test-run the tool, use the login:g Since the tool uses Html5 and features standard only in newer browsers, please note that the tool will only work in Firefox 3.5+, Google Chrome, and Safari.


-If you are a participant looking to open a new account, please write to contact@edgwareroad.org. A basic introduction to its features are found in our first publication, Instructions for Printing, here. +If you are a participant looking to open a new account, please write to hello@edgwareroad.org. A basic introduction to its features are found in our first publication, Instructions for Printing, here.