From f7f3cc806bc0bcbac7baa5ceb5f9eb0d1e7211a5 Mon Sep 17 00:00:00 2001 From: Alex Hermida Date: Fri, 19 Jan 2018 13:06:14 +0100 Subject: [PATCH] Add comment to project retrieve filter --- taiga/projects/api.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/taiga/projects/api.py b/taiga/projects/api.py index 1fd654a9..fe5a4cd3 100644 --- a/taiga/projects/api.py +++ b/taiga/projects/api.py @@ -139,6 +139,8 @@ class ProjectViewSet(LikedResourceMixin, HistoryResourceMixin, qs = self.get_queryset() if self.action == "by_slug": self.lookup_field = "slug" + # If we retrieve the project by slug we want to filter by user the + # permissions and return 404 in case the user don't have access flt = filters.get_filter_expression_can_view_projects( self.request.user)