From 951633d74c6f82b59746f4011ce4d6ef64e699b9 Mon Sep 17 00:00:00 2001 From: Narayan Date: Fri, 1 Jul 2016 14:57:15 +0530 Subject: [PATCH] Allow superusers to access the `sponsor_detail` view. Fixes #139 --- symposion/sponsorship/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/symposion/sponsorship/views.py b/symposion/sponsorship/views.py index 3f749900..ad329631 100644 --- a/symposion/sponsorship/views.py +++ b/symposion/sponsorship/views.py @@ -77,7 +77,7 @@ def sponsor_add(request): def sponsor_detail(request, pk): sponsor = get_object_or_404(Sponsor, pk=pk) - if sponsor.applicant != request.user: + if sponsor.applicant != request.user and not request.user.is_superuser: return redirect("sponsor_list") formset_kwargs = {