Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 UTC on 18 March 2024, to get $100 off your ticket.
This issue is caused by a user trying to select a image that is used in a node that they don't have access to due to it being unpublished. What appears to be happening is since the content type the user does not have access to is having is access checked first, it is breaking out of the foreach for all content types, not just the loop checking revisions.
Changing the break from 2 to 1 will stop it from checking other revisions, but still allow it to check other node types.
Comment | File | Size | Author |
---|---|---|---|
#2 | filefield-download_permission_bug-2210831-2.patch | 563 bytes | eewan |
filefield_multiple_node_type_permission_error.patch | 465 bytes | Anonymous (not verified) |
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedComment #2
eewan CreditAttribution: eewan commentedThis bug manifests itself in different ways.
To be pedantic the bug is not really related to different content types. You can have two nodes of the same content type both of which reference the same file, and if one of the two nodes is unpublished you have the problem.
The outer foreach loops over field types, the inner foreach loops over revisions. This means that a break 1 will not always suffice.
I suggest removing the break entirely.