| 458 | permission_classes = (AllowAny, ) |
| 459 | |
| 460 | def get_and_check_task(self, request, pk, annotate={}): |
| 461 | try: |
| 462 | task = self.queryset.annotate(**annotate).get(pk=pk) |
| 463 | except (ObjectDoesNotExist, ValidationError): |
| 464 | raise exceptions.NotFound() |
| 465 | |
| 466 | # Check for permissions, unless the task is public |
| 467 | if not (task.public or task.project.public): |
| 468 | check_project_perms(request, task.project) |
| 469 | |
| 470 | return task |
| 471 | |
| 472 | |
| 473 | def download_file_response(request, filePath, content_disposition, download_filename=None): |