Hi
I am using the survey module
It appears taht anonymous user cannot submit a survey and thus anwers my question unless I give anonymous the right to edit and manage survey wich I don't want. What can I do ?

jp

Comments

elpix’s picture

I have the same problem

yoyoned’s picture

You need to set correct permissions. Go to ?q=admin/user/access find "submit surveys" anc check the box for anonymous users

verbal@drupal.org’s picture

You have to set the correct permissions as well as make a change to the module. I'll submit an issue on this and the patch. The module forgets one 'if' statement line. Replace the survey_access function with this one:

/**
 * Implementation of hook_access
 */
function survey_access($op, $node) {
  global $user;
  if ($op == 'view' &&  user_access('submit surveys')) {
    return TRUE;
  }
  if ($op == 'create' &&  user_access('maintain surveys')) {
    return TRUE;
  }

  if ($op == 'update' && user_access('maintain surveys')) {
    return TRUE;
  }
  
  if ($op == 'delete' && user_access('maintain surveys')) {
    return TRUE;
  }
}

Fixed the issue for me. I did this on the 5.x version, probably the same issue on 4.7 but I haven't looked at it.

-Steve