Poll.module in current CVS has a new feature which lets users to cancel their vote if the admin gives permission. But "cancel own vote" permission gives users to cancel every votes unlimited times (this means negative vote count for choices).

Attached patch checks if the user has voted ($node->allowvotes) and deletes his/her vote.

And a question:
I didn't changed the behavior for "Closed" polls. Currently, users are able to cancel their vote on closed polls if they have "Cancel own vote" permission. My question is: Should users be able cancel their own vote on closed polls?

---
I created the patch by a CVS client which I don't know how to save diff in a file. So the patch file may be corrupted since I just copy/pasted it from the client's console.

CommentFileSizeAuthor
cancel_vote.patch2.13 KBerdemkose
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drumm’s picture

Status: Needs review » Fixed

Committed to HEAD.

Anonymous’s picture

Status: Fixed » Closed (fixed)