diff options
author | Dan McGee <dan@archlinux.org> | 2012-09-25 07:49:54 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-09-25 07:49:54 +0200 |
commit | 67fef06fe8d07e8b832e447a6b2064fb051a5ef9 (patch) | |
tree | 96bb57d3ec524f095c706278043f2c1be540aa44 | |
parent | 3eed426027ed6bc87b58f82d48da06bea55b265f (diff) | |
download | archweb-67fef06fe8d07e8b832e447a6b2064fb051a5ef9.tar.gz archweb-67fef06fe8d07e8b832e447a6b2064fb051a5ef9.tar.xz |
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>
-rw-r--r-- | public/views.py | 5 |
1 files changed, 4 insertions, 1 deletions
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) |