Skip to content

Commit b477ed1

Browse files
committed
fix(permissions): allow reading draft media files
* Listing a draft's media files requires the same permission as for reading regular draft files, i.e. record owners and other users with "read"-like permissions on the draft. * This fixes actually a permissions issue on request detail pages, where the owner of the draft/record wasn't able to see the page, if there were draft media files (e.g. PTIFF tiles for PDFs and images).
1 parent aeba423 commit b477ed1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

site/zenodo_rdm/permissions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ class ZenodoRDMRecordPermissionPolicy(RDMRecordPermissionPolicy):
219219

220220
# Media files
221221
can_draft_media_create_files = [MediaFilesManager(), SystemProcess()]
222-
can_draft_media_read_files = can_draft_media_create_files
222+
can_draft_media_read_files = can_draft_read_files
223223
can_draft_media_set_content_files = [
224224
IfTransferType(LOCAL_TRANSFER_TYPE, can_draft_media_create_files),
225225
SystemProcess(),

0 commit comments

Comments
 (0)