Skip to content

Commit

Permalink
Fix session detail page for collaborators (fixes #74)
Browse files Browse the repository at this point in the history
  • Loading branch information
milesmcc committed Aug 18, 2020
1 parent 6652acd commit 03062e3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions shynet/dashboard/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down

0 comments on commit 03062e3

Please sign in to comment.