Needs review
Project:
Multifield
Version:
7.x-1.x-dev
Component:
User interface
Priority:
Major
Category:
Bug report
Assigned:
Reporter:
Created:
13 Mar 2014 at 12:57 UTC
Updated:
22 Jun 2022 at 10:27 UTC
Jump to comment: Most recent
In the filed image properties, if I set it to upload images in private folder, images are viewable only by his owner, administrators can't view them even if they could.
(Anyway, great module! I hope in a stable release soon!!!)
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #1
dave reidConfirmed the bug. Looks like we're going to need to copy what file_file_download() does for anything inside a multifield.
Comment #2
dave reidBTW I added a 'Known issues' on https://drupal.org/project/multifield for this issue.
Comment #3
slayne40 commentedHy,
To define access to private files, Drupal uses the "file_download" function and "hook_file_download"...
And more precisely "file_file_download" function.
No information is returned if the field is "multifield" type.
Create the "multifield_file_download" so that it returns the correct values.
Comment #6
mustanggb commentedThere are many different way of writing this.
Here is a version that tries to keep it as close to the original as possible, whilst supporting both files and images.
It's worth noting that
multifield_get_file_references()returns the multifield's parents references rather than the subfield's parent references (i.e. the multifield). For example a subfield in a multifield in a node will return a list of nodes rather than a list of multifields.