summaryrefslogtreecommitdiff
path: root/public/views.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-09-25 00:49:54 -0500
committerDan McGee <dan@archlinux.org>2012-09-25 00:49:54 -0500
commit67fef06fe8d07e8b832e447a6b2064fb051a5ef9 (patch)
tree96bb57d3ec524f095c706278043f2c1be540aa44 /public/views.py
parent3eed426027ed6bc87b58f82d48da06bea55b265f (diff)
Only show staging feeds to logged-in users
This doesn't prevent unauthenticated users from accessing the feeds, but it should reduce clutter and confusion on the feeds index page for users unlikely to need these feeds. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'public/views.py')
-rw-r--r--public/views.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/public/views.py b/public/views.py
index 35315e0e..42f2f345 100644
--- a/public/views.py
+++ b/public/views.py
@@ -86,9 +86,12 @@ def download(request):
@cache_control(max_age=300)
def feeds(request):
+ repos = Repo.objects.all()
+ if not request.user.is_authenticated():
+ repos = repos.filter(staging=False)
context = {
'arches': Arch.objects.all(),
- 'repos': Repo.objects.all(),
+ 'repos': repos,
}
return render(request, 'public/feeds.html', context)