summaryrefslogtreecommitdiff
path: root/devel/views.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-10-05 10:33:54 -0500
committerDan McGee <dan@archlinux.org>2011-10-05 10:33:54 -0500
commit81884005d8496e12f9636e872eaedff33af77e30 (patch)
treee982ec65a5c067a4f1fe321f53906ee59d5c2d26 /devel/views.py
parent94b4a6a3a322045e16429fd6d61e8cd051b21dd1 (diff)
Allow developer index to work with a non-authenticated user
This is not the normal case given the decorator on the view, but during testing and development it is sometimes useful so others don't have to log in over a non-secure connection to check things out. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'devel/views.py')
-rw-r--r--devel/views.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/devel/views.py b/devel/views.py
index 79eef318..ebae3b32 100644
--- a/devel/views.py
+++ b/devel/views.py
@@ -31,7 +31,12 @@ from string import ascii_letters, digits
@never_cache
def index(request):
'''the developer dashboard'''
- inner_q = PackageRelation.objects.filter(user=request.user).values('pkgbase')
+ if(request.user.is_authenticated()):
+ inner_q = PackageRelation.objects.filter(user=request.user)
+ else:
+ inner_q = PackageRelation.objects.none()
+ inner_q = inner_q.values('pkgbase')
+
flagged = Package.objects.normal().filter(
flag_date__isnull=False, pkgbase__in=inner_q).order_by('pkgname')