From c50b224c235c25c5c30760603617901af634af30 Mon Sep 17 00:00:00 2001 From: Sanj Date: Fri, 5 Oct 2012 17:25:44 +0530 Subject: [PATCH 1/4] remove instructions right now --- chaloBEST/mumbai/apiviews.py | 2 ++ smsBEST/templates/dashboard.html | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/chaloBEST/mumbai/apiviews.py b/chaloBEST/mumbai/apiviews.py index 09e0b6a..cd4b003 100644 --- a/chaloBEST/mumbai/apiviews.py +++ b/chaloBEST/mumbai/apiviews.py @@ -87,6 +87,8 @@ def stops(request): def stop(request, slug): srid = int(request.GET.get("srid", 4326)) if request.POST and request.POST.has_key('geojson'): + if not request.user.is_staff(): + return render_to_json_response({'error': 'No permission'}) if not slug: stop = Stop() #FIXME: should this return an error instead? else: diff --git a/smsBEST/templates/dashboard.html b/smsBEST/templates/dashboard.html index 69d70d1..c9a7a53 100755 --- a/smsBEST/templates/dashboard.html +++ b/smsBEST/templates/dashboard.html @@ -121,6 +121,7 @@ $(function() {

Welcome!

+

Welcome!

+
+click here for instructions