Active
Project:
Petition Node
Version:
6.x-1.4
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
22 Apr 2010 at 23:58 UTC
Updated:
12 Dec 2012 at 21:56 UTC
If a user doesn't have access to see signatures, they still see an active link in $links that leads to an "access denied" page. It would be nicer if they saw un-hyperlinked text or no signature count at all. I achieved the latter by adding a permission check on line 1071.
/**
* implementation of petition_link().
*/
function petition_link($type, $object, $teaser = FALSE) {
$links = array();
if(($type == 'node') AND $object->type == 'petition' && user_access('view_signatures')) {
$links['signature_counts'] = array(
'title' => format_plural($object->signatures, '1 signature', '@count signatures'),
'href' => "node/$object->nid/signatures"
);
}
return $links;
}
Comments
Comment #1
VirtualNorman commentedI just posted a related issue "view signatures" permission not checked or used. Guess I could have posted it here as a comment.