From dec395df81b874a8b88e34935712f9265d412eef Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Fri, 31 Oct 2008 19:53:43 +0100 Subject: [PATCH] Allow staff to view anything on the front site. In particular, influence_detail and character_detail no longer deny access to staff members. --- influences/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/influences/views.py b/influences/views.py index 35ee02e..7f7b262 100644 --- a/influences/views.py +++ b/influences/views.py @@ -79,7 +79,7 @@ def character_list(request): def character_detail(request, object_id): o = Character.objects.get(pk=object_id) # Don't show other player's characters - if (o.player != request.user): + if (not request.user.is_staff and o.player != request.user): return HttpResponseForbidden("Forbidden -- Trying to view somebody else's character") return render_to_response('influences/character_detail.html', {'object' : o}, RequestContext(request)) @@ -101,7 +101,7 @@ def influence_detail(request, object_id): o = Influence.objects.get(pk=object_id) # Don't show other player's influences - if (o.character.player != request.user): + if (not request.user.is_staff and o.character.player != request.user): return HttpResponseForbidden("Forbidden -- Trying to view influences of somebody else's character") # Show all comments to staff, but only public comments to other -- 2.30.2