diff downloads/views.py @ 845:41d0389fc85a

For issue #78, check is_public before showing weblinks or downloads.
author Brian Neal <bgneal@gmail.com>
date Sun, 19 Oct 2014 19:36:43 -0500
parents 89b240fe9297
children a5ebc74dc3f3
line wrap: on
line diff
--- a/downloads/views.py	Tue Oct 14 15:14:50 2014 -0500
+++ b/downloads/views.py	Sun Oct 19 19:36:43 2014 -0500
@@ -145,6 +145,8 @@
 @login_required
 def details(request, id):
     download = get_object_or_404(Download.public_objects, pk=id)
+    if not download.is_public:
+        raise Http404
     return render_to_response('downloads/download_detail.html', {
         'download' : download,
         },