Currently users who are not administrators cannot use any polls. There are 4 menu router items that have the following:

'access arguments' => array('show poll'),

However there is no permission of "show poll".

For my purposes I added a permission and altered each access argument like this:

/**
 * hook_perm implementation
 */
function makemeeting_permission() {
  return array(
    'access all polls' => array(
      'title' => t("Access all makemeeting polls"),
      'restrict access' => TRUE,
    ),
    'access own polls' => array(
      'title' => t("Access Own polls"),
    ),
    'show makemeeting poll' => array(
      'title' => t("Show Makemeeting polls"),
    ),
  );
}

Then altered the menu router items like this:

'access arguments' => array('show makemeeting poll'),
CommentFileSizeAuthor
#2 1394298.patch1.96 KBSebCorbin

Comments

SebCorbin’s picture

Wouldn't it be better to rename it all to "view makemeeting poll"?

Also, thanks for highlighting this!

SebCorbin’s picture

Assigned: Unassigned » SebCorbin
Status: Active » Fixed
StatusFileSize
new1.96 KB

Patch attached, committed to 7.x-1.x-dev

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.