Hello,
Here is a problem I often regret when I use Drupal: access rights are not enough granular.
In this case, the problem is that we want users to be able to administer nodes, but not to be able to set initial votes counts.
The modifications we made on poll.module are attached.

Can I have some feedback and your opinion on what we've done?

Thank you,
David
PS: we may have the same problem concerning the separation of "set node author" from "administer nodes", what do you think of this one?

Comments

Anonymous’s picture

Status: Needs review » Needs work

I think the idea is fine but you need to standardize the comments. You can find the standards at [1] as well as other helps. You can also follow the example of the existing comments.

[1] http://drupal.org/handbooks

David Stosik’s picture

Status: Needs work » Needs review
StatusFileSize
new1.57 KB

Thank you.
I modified the comments in this version.

David

David Stosik’s picture

StatusFileSize
new1.73 KB

I corrected my patch behaviour. Now, "set vote counts" and "set poll settings" (active or closed, and poll duration) user access rights are separated from "administer nodes".

JirkaRybka’s picture

Version: 5.2 » 7.x-dev

I'm afraid that new features now go into Drupal 7 branch only. Otherwise seems to me like a minor, but somewhere useful change, which may not hurt to have. :)

birdmanx35’s picture

Status: Needs review » Needs work

This no longer works against HEAD.

Jaza’s picture

Version: 7.x-dev » 8.x-dev

Moving.

alexpott’s picture

Project: Drupal core » Poll
Version: 8.x-dev » 8.x-1.x-dev
Component: poll.module » Code

Poll is no longer part of core

adammalone’s picture

Title: Separate "set initial votes counts" access right from "administer nodes" access right » Add a permission to allow users to edit number of votes without having the administer nodes permission
Assigned: David Stosik » Unassigned
Status: Needs work » Active

Poll module as it currently stands allows poll votes to be manipulated via the node/%node/edit page.

The way I see it, if there is to be an additional permission for setting poll votes then perhaps it should be on a different tab (either node/%node/votes or a new one) with access granted to that with the as yet implemented permission.

adammalone’s picture

Issue summary: View changes

Poll is now its own entity and now no longer relies on node permissions. In the near future I envisage further permissions to allows polls to be created and votes manipulated. This can be addressed further as part of those changes.

berdir’s picture

Status: Active » Fixed

I'm marking this as fixed since it "just" requires the administer polls permission now. If more specific permissions are needed, then I think separate feature requests for that are better.

Status: Fixed » Closed (fixed)

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