I may be missing some bit of configuration here, but I can't figure out why the reset link is showing up for any user with access to vote up or down through the widget. This is the only bit of code I can find that sets the $show_reset variable that governs whether or not the various template files show the link:
vud.theme.inc, line 223:
if ($up_access || $down_access) {
$variables['show_reset'] = TRUE;
$variables['class_reset'] = 'reset-active';
}
The reset link doesn't work, but I don't understand why it isn't shown in the first place. We should know whether or not the user is able to reset votes on an entity before they click the link. Granted, I can't seem to find a simple API function for checking that access, but I assume this is being checked in that link's callback somehow.
I solved the visibility issue by just changing TRUE to user_access('reset vote up/down votes');, but something tells me this isn't the right solution. At the minimum, it seems there should be an access callback to determine a user's ability to delete votes for a given entity, but I'm having a hard time understanding the structure of this module to trace it down.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 0001-Issue-1484716-Fixed-Any-voting-user-see-the-reset-li.patch | 1.78 KB | marvil07 |
Comments
Comment #1
marvil07 commentedThanks for the report.
I have applied the attached patch to 7.x-1.x, I think it's solved, please let me know if there is something more to do.