Access Denied Errors

mcload - April 26, 2009 - 08:59
Project:Webform Associate
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Description

After installing this module, I can no longer access webform's analysis page like node/18/webform-results/analysis . It gives access denied error. Also I can not access Form Components editing page like node/18/edit/components . I am using the admin account that should have access permission to everything automatically.

#1

jdwfly - May 1, 2009 - 21:34

Same issues here, but I am using the most recent dev version of the project. I can access the components part of the webform though.

I started messing with your code and found that your If statement on 51 might be the culprit. It seems as though it's always false which takes you down to the else which returns false.

It seems as though the function is not being passed the $node->nid value. This is the third argument in line 48. Thus when you give that a default value of NULL this problem goes away, but you still have the problem that your If statement does not work because $node is now NULL by default.

#2

jdwfly - May 4, 2009 - 15:54
Version:6.x-1.0-beta2» 6.x-1.x-dev

I made a patch that allows the superuser (UID = 1) to be able to view the pages. I took a look at the code but I couldn't figure out why it was not working. This will allow the superuser to view the submissions, analysis, etc.

NOTE
This patch was made off of the current dev release.

AttachmentSize
webform_associate.445232.patch 916 bytes

#3

jdwfly - May 4, 2009 - 15:57
Status:active» needs review

#4

jdwfly - May 5, 2009 - 22:02
Status:needs review» needs work

I just noticed that the patch I submitted does place Local Tabs into nodes that do not have a webform associated with them. As I said before this is not a complete patch, but it does allow you to look at results.

I'll try to see if I can iron this out properly.

#5

jdwfly - May 5, 2009 - 22:19
Status:needs work» needs review

All right, I finally went to see what changed in the Webform module. Looks like they decided to change one simple word in their menu structure and that broke the menu alter function in this one. This patch should allow users with appropriate permissions to access the submissions, analysis, tables, downloads, etc.

AttachmentSize
webform_associate-445232-1.patch 1.38 KB

#6

shaisachs - November 17, 2009 - 13:25

I agree with the basic diagnosis in 5, but disagree with the patch. The latest webform module (2.9) uses both webform_submission_access and webform_results_access as access callbacks, so webform_associate should anticipate both. I believe my patch in #358252: error in webforms: 'Missing argument 3 for webform_associate_menu_access' correctly addresses the problems, both in that queue and in this one.

 
 

Drupal is a registered trademark of Dries Buytaert.