# HG changeset patch # User Brian Neal # Date 1413765403 18000 # Node ID 41d0389fc85a342a5f5ac178abfbf027572047ab # Parent 6900400f971ba713f0e0a7a3dce8cc70bbedcdaa For issue #78, check is_public before showing weblinks or downloads. diff -r 6900400f971b -r 41d0389fc85a downloads/views.py --- 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, }, diff -r 6900400f971b -r 41d0389fc85a weblinks/views.py --- a/weblinks/views.py Tue Oct 14 15:14:50 2014 -0500 +++ b/weblinks/views.py Sun Oct 19 19:36:43 2014 -0500 @@ -191,6 +191,8 @@ def link_detail(request, id): link = get_object_or_404(Link, pk=id) + if not link.is_public: + raise Http404 return render_to_response('weblinks/link_detail.html', { 'link': link, },