From 03062e3de5062c26a8f7b52a247fad5f8803f635 Mon Sep 17 00:00:00 2001 From: "R. Miles McCain" Date: Tue, 18 Aug 2020 15:41:50 +0000 Subject: [PATCH] Fix session detail page for collaborators (fixes #74) --- shynet/dashboard/views.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/shynet/dashboard/views.py b/shynet/dashboard/views.py index f5fff678..7193f85d 100644 --- a/shynet/dashboard/views.py +++ b/shynet/dashboard/views.py @@ -139,6 +139,9 @@ class ServiceSessionView(LoginRequiredMixin, PermissionRequiredMixin, DetailView context_object_name = "session" permission_required = "core.view_service" + def get_permission_object(self, **kwargs): + return self.get_object().service + def get_context_data(self, **kwargs): data = super().get_context_data(**kwargs) data["object"] = get_object_or_404(Service, pk=self.kwargs.get("pk"))