View Files Attached to Unpublished Nodes
SomebodySysop - August 29, 2008 - 19:12
| Project: | view_unpublished |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Description
Even with view_unpublished I do not appear to be able to view files attached to unpublished nodes if I am not the author of the node. Any ideas on how to resolve this?

#1
Hmm, excellent question. I will look into this early next week -- I would start digging around in file attach permissions if you want to get started sooner rather than later! :)
#2
any luck?
#3
I tracked this problem down to the module weight.
Because this module runs before other modules when it does it's hook_nodeapi and redirects it means other modules hook_nodeapis aren't run (for example upload_nodeapi that handles file attachments).
This is an issue because this module also has to run before other modules so that it can take over the menu permissions handling.
This patch addresses this issue by moving the hook_nodeapi out into it's own module which has a weight greater then other modules.
It isn't the greatest looking solution but when you're dealing with module weights and menu altering there isn't much you can do about that.
If this is an issue with the D6 module i'm sure this is easily portable.
#4
This patch also has some instruction added to the readme.
#5
This patch has the same functionality as the patch in #4
but it will apply cleanly if you have already applied the patch in #500432: Allow Access To Revisions