Skip to content

Commit

Permalink
Fix incorrect .can_edit() call for preprints
Browse files Browse the repository at this point in the history
  • Loading branch information
cslzchen committed Sep 6, 2024
1 parent aa7e1e0 commit 156ffd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/base/permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 156ffd8

Please sign in to comment.