At the moment a problem in Slowvote is: if you make the Slowvote application public, every registered user can create a Slowvote. That is indeed too powerful ("Fast") and against the "Slow" spirit of Slowvote.
The proposed solution is: allow to set a "Default Edit Policy" in Slowvote. That would allow to setup this desired anti-spam situation in Wikimedia Phabricator:
- Default Visible To: Public
- Default Edit Policy: Trusted Users
This was requested from our kind Wikimedia Phabricator folks. Downstream task:
https://phabricator.wikimedia.org/T337031
Inspirationals
Probably we can have great inspiration from this similar patch regarding the Countdown application:
D25101: Countdown: add a capability to decide who can Create
For the records, here is the source code of the Slowvote component:
https://we.phorge.it/source/phorge/browse/master/src/applications/slowvote/
Concrete Stuff
So we should probably:
- Create a PhabricatorSlowvoteCreateCapability class inside this directory:
https://we.phorge.it/source/phorge/browse/master/src/applications/slowvote/capability/
P.S. We can probably copy that from PhabricatorCountdownCreateCapability:
- Find what is the curresponding "PhabricatorSlowvoteEngine" class since it exists a "PhabricatorCountdownEditEngine"
- Edit the PhabricatorSlowvoteApplication::getCustomCapabilities():
To do something like this: