(self, request: Request, view: View)
| 20 | |
| 21 | class ProjectAuditLogPermissions(BasePermission): |
| 22 | def has_permission(self, request: Request, view: View): # type: ignore[no-untyped-def] |
| 23 | try: |
| 24 | project_id = view.kwargs["project_pk"] |
| 25 | project = Project.objects.get(id=project_id) |
| 26 | except (Project.DoesNotExist, KeyError): |
| 27 | return False |
| 28 | |
| 29 | return request.user.has_project_permission(VIEW_AUDIT_LOG, project) # type: ignore[union-attr] |