From 67fef06fe8d07e8b832e447a6b2064fb051a5ef9 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 25 Sep 2012 00:49:54 -0500 Subject: 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 --- public/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'public') diff --git a/public/views.py b/public/views.py index 35315e0..42f2f34 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) -- cgit v1.2.3-24-g4f1b