From 156ffd85837350c3ce450d8875d38496314321ea Mon Sep 17 00:00:00 2001 From: Longze Chen Date: Fri, 6 Sep 2024 15:28:16 -0400 Subject: [PATCH] Fix incorrect `.can_edit()` call for preprints --- api/base/permissions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/base/permissions.py b/api/base/permissions.py index a6ab1403c05..50f467a8512 100644 --- a/api/base/permissions.py +++ b/api/base/permissions.py @@ -174,5 +174,5 @@ def has_object_permission(self, request, view, obj): return resource.is_public or resource.can_view(auth) else: if isinstance(resource, Preprint): - return resource.can_edit(auth.user) + return resource.can_edit(auth=auth) return resource.has_permission(auth.user, osf_permissions.WRITE)