From 1cd59e8549989819ba961a440edd0fafd662d1a9 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Fri, 16 Jan 2009 22:24:53 +0100 Subject: [PATCH] Allow all related players to view an influence. --- influences/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/influences/views.py b/influences/views.py index b202c07..e741605 100644 --- a/influences/views.py +++ b/influences/views.py @@ -101,8 +101,8 @@ def influence_detail(request, object_id): o = Influence.objects.get(pk=object_id) # Don't show other player's influences - if (not request.user.is_staff and o.initiator.player != request.user): - return HttpResponseForbidden("Forbidden -- Trying to view influences of somebody else's character") + if (not request.user.is_staff and not request.user in o.related_players): + return HttpResponseForbidden("Forbidden -- Trying to view influences you are not involved in.") # Show all comments to staff, but only public comments to other # users -- 2.30.2