- 🇧🇷Brazil rodrigoeg
@Quentin Massez, please check if the solution of 🐛 File downloads restricted in disabled language depending on browser language Fixed fixes your issues. I am not sure if private files should be controlled by another way.
Hello,
Thank you for this module.
I first used it to prevent access of untranslated nodes but my client reported me a bug :
The default language of my site is "FR". If a node is created in "EN" with a private file and not translated in "FR".
The files does not appear on the node and I get access denied on /system/files/file.pdf. Indeed, users don't have access to the node in "FR", so the private file is not accessible.
In a general way, I think the hook_node_access just depends on : operation, node and account. It doesn't take into account a language parameter so that we should not using this hook to restrict access.
Maybe we should add a custom access on the callback of routes 'entity.node.canonical' . That would prevents the access to the page too but in a "less hard way" so that drupal always considers that we have access to the node. (which is the case according to me)
You'll find an archive of the code I made to illustrate, i'm opened to discuss it.
Thanks,
Active
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
@Quentin Massez, please check if the solution of 🐛 File downloads restricted in disabled language depending on browser language Fixed fixes your issues. I am not sure if private files should be controlled by another way.