Workflow and permissions#
Polls use their own workflow, poll_workflow.
stateDiagram-v2
direction LR
[*] --> private
private --> pending: Submit for opening
pending --> private: Retract
private --> open: Open
pending --> open: Open
pending --> private: Reject
open --> closed: Close
open --> private: Reject, removes every vote
closed --> open: Open
private: Private
pending: Pending review
open: Open, collects votes
closed: Closed, shows final results
States#
State |
Id |
Who can see it |
Who can change it |
Who can vote |
|---|---|---|---|---|
Private |
|
Owner, Reader, Contributor, Editor, Manager, Site Administrator |
Owner, Editor, Manager, Site Administrator |
Nobody |
Pending review |
|
The roles of Private, and Reviewer |
Manager, Reviewer, Site Administrator |
Nobody |
Open |
|
Whoever can see the poll's folder |
Nobody |
Member, Reader, Contributor, Editor, Reviewer, Manager, Site Administrator; and Anonymous, see below |
Closed |
|
Whoever can see the poll's folder |
Nobody |
Nobody |
A new poll starts Private.
Transitions#
Transition |
Id |
From |
To |
Guard permission |
|---|---|---|---|---|
Submit for opening |
|
Private |
Pending review |
Request review |
Retract |
|
Pending review |
Private |
Request review |
Open |
|
Private, Pending review, Closed |
Open |
Review portal content |
Reject |
|
Pending review, Open |
Private |
Review portal content |
Close |
|
Open |
Closed |
|
Two transitions do more than change the state.
Open grants the vote permission to Anonymous on the poll, when the poll allows anonymous votes and its folder is the site root or is visible to Anonymous. The check happens only at that moment: publishing the folder later does not let anonymous visitors vote until the poll is opened again.
Reject removes every vote of the poll.
Permissions#
Permission |
Id |
Granted by default to |
|---|---|---|
|
|
Manager, Site Administrator, Owner, Contributor |
|
|
Manager, Site Administrator, Reviewer |
|
|
Nobody; the workflow grants it on open polls |
Having the vote permission is not enough to vote twice: see Voting and results.