Closed (fixed)
Project:
Webform Report
Version:
7.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Nov 2011 at 18:32 UTC
Updated:
18 Feb 2012 at 17:10 UTC
Jump to comment: Most recent file
Comments
Comment #1
sphankin commentedCorrection - this happens UNLESS the permission for 'accessing webform reports' is set for all to see.
Comment #2
jimbullington commentedSorry about that - you can probably comment out these lines in webform_report.module (106-113):
I will look into it ASAP - still trying to get a handle on the D7 API :-(
Comment #3
jimbullington commentedThis hook has been removed for now.
Comment #4
sphankin commentedThanks - that solved that problem however it now removes all node access rights and all the nodes become public?
Comment #5
jimbullington commentedThe Webform Reports are still protected by node access - a user must have permission to view or edit them.
Comment #6
sphankin commentedThat's not the problem - sorry didn't explain it clearly.
When you enable the module ALL nodes that had some protection from node access (eg Basic Pages, Articles etc) become public - it appears like there is no restrictions on anything...
When you disable the module, all the protected pages become protected again.
Thanks
Sam
Comment #7
nasinandes commentedHello,
I'm the same problem. If I enable webform_report 7.x dev all content all restricted for admin. Anonym users only can read "access denied", if I disabled webform_report all content are accessible.
I comment all function webform_report_node_access($node, $op, $account) on webform_report.module and again all content are accessible again. I think that my accion isn't correct but I haven't any best idea.
Any suggestion?
Thanks
Comment #8
msrc_spinks commentedAlso having the same issue. With this module enabled, only admin can see nodes of any type. Disable it and permissions return to normal.
Comment #9
smithdalec commentedThe problem is caused by webform_report.module returning NODE_ACCESS_ALLOW for any content type in the webform_report_node_access hook.
I added a few lines that will only let Webform Report allow/deny it's own content type.
I'm attaching a patch.
Cheers!
Comment #10
jimbullington commentedThanks for the patch!
I would like to suggest some revisions - let's get the node type based on the example at:
http://api.drupal.org/api/drupal/modules--node--node.api.php/function/ho...
and return NODE_ACCESS_IGNORE at the bottom.
See what you think about the attached patch.
Comment #11
smithdalec commentedThat looks great! I was actually looking for a better way to find the node type :)
Comment #12
jimbullington commentedI've pushed the updated patch - should be in the next 7.x-1.x-dev build.
Comment #13
jimbullington commented