Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I have filefield files attached to a node. This node has terms associated and its visibility is setup by taxonomy access.
How can i make private files of the node X at a private term Y?
I'd like to control if a file is or not accessible by everyone if the user has permission to see the node.
Is it possible with this module?
thanks
Carlos
Comments
Comment #1
johnhanley CreditAttribution: johnhanley commentedPrivate Download doesn't presently enforce such access controls, but it's certainly possible. The module would have to be modified to be "Taxonomy Access" aware.
Comment #2
carvalhar CreditAttribution: carvalhar commentedcan you explain me where to start?
Comment #3
johnhanley CreditAttribution: johnhanley commentedYou'll need to check access permissions for the node (and corresponding terms) in hook_download. Instead of growing your own, Taxonomy Access might provide an API function for checking access.
Comment #4
carvalhar CreditAttribution: carvalhar commentedthanks for answering me.
But this time I'll use Node Private File. At my specif case, this module is the best because it creates a folder with a htaccess that hides all attempts of unauthorized users to download.
Comment #5
johnhanley CreditAttribution: johnhanley commented