Page MenuHomePhabricator

Admins should be able to grant election-admin role on testwiki
Closed, ResolvedPublicBUG REPORT

Description

We currently have a situation on test.wikipedia.org where:

  • No new election-admin can be "appointed" since no user has the ability to grant the election-admin userright to users
  • Admins can only create polls, but cannot edit polls themselves

This makes testing how SecurePolls behave wrt to the upcoming May 2026 Admin elections rather difficult on Test Wikipedia

What should happen:

  • Admins should be able to grant election-admin.
  • Admins should get the ability to edit polls or the ability to create polls should be taken away from admins

Event Timeline

For added context, I encountered the issue earlier today while testing SecurePoll there. Not sure if granting should be crat-specific or available to all admins, I'm open to both as I can't see much potential for disruption from creating polls.

Just to document my findings:

  • The election-admin group appears to have been added in T209892 back during when MediaWiki-extensions-SecurePoll was in much worse shape, in that context, removing any way to grant the right makes sense (over PII-exposure concerns)
  • However, SecurePoll's code has come a long way since then, such that election-admin is given to admins without NDA access on enwiki. To my understanding, SecurePoll now only displays PII if a user has a group with securepoll-view-voter-pii. Editing and creating a poll should be fine for NDA users.
  • The securepoll-create-poll userright in admin comes from this commit of 2014 vintage added without any associated phab task or local discussion.

My thoughts would be to:

  • Remove the securepoll-create-poll right from admins
  • Rename election-admin to electionclerk (to match how the userright is used across global wikis)
  • Give admins the ability to grant electionclerk (again reflects, fawiki, zhwiki, and enwiki where the MediaWiki-extensions-SecurePoll extension is deployed)

Given that Test Wikipedia doesn't necessarily have an active community and the previous iterations of these additions didn't seek consensus, I'm planning to implement this unless someone has strong concerns.

This comment was removed by Soda.

@Bugreporter: I think the issue is largely resolved because the extension has been changed (as part of that task, see this commit and this one) to no longer grant PII viewing to anyone who can create or edit polls. (the two rights bundled with electionadmin on testwiki). On production wikis, zhwiki, fawiki, and enwiki all allow sysops to add the equivalent of this userright to anyone. The specific user right that allows viewing PII is securepoll-view-voter-pii, which is explicitly not present for electionadmins.

Soda renamed this task from Crats should be able to grant election-admin role on testwiki to Admins should be able to grant election-admin role on testwiki.Apr 21 2026, 12:55 AM

Per https://test.wikipedia.org/wiki/Special:ListGroupRights, testwiki no longer lets election admins view any PII (since the user right securepoll-view-voter-pii is missing). So it should be fine to allow the electionadmin group to be granted by non-stewards.

If we need any testwiki consensus, the typical place to get such a consensus is https://test.wikipedia.org/wiki/Wikipedia:Village_pump. In my experience they are sensitive about configuring testwiki to mimic enwiki without consideration for non-enwiki wikis, so wouldn't hurt to double check the proposed change from "election admin" to "election clerk" there.

image.png (1,159×214 px, 48 KB)

Change #1278435 had a related patch set uploaded (by Novem Linguae; author: Novem Linguae):

[operations/mediawiki-config@master] testwiki: allow sysops to add/remove electionadmin

https://gerrit.wikimedia.org/r/1278435

A week later, no objections and lots of support. I've written a patch if someone else would like to handle backporting it.

Change #1278435 merged by jenkins-bot:

[operations/mediawiki-config@master] testwiki: allow sysops to add/remove electionadmin

https://gerrit.wikimedia.org/r/1278435

Mentioned in SAL (#wikimedia-operations) [2026-04-28T13:34:58Z] <lucaswerkmeister-wmde@deploy1003> Started scap sync-world: Backport for [[gerrit:1278435|testwiki: allow sysops to add/remove electionadmin (T423962)]]

Mentioned in SAL (#wikimedia-operations) [2026-04-28T13:36:46Z] <lucaswerkmeister-wmde@deploy1003> lucaswerkmeister-wmde, novemlinguae: Backport for [[gerrit:1278435|testwiki: allow sysops to add/remove electionadmin (T423962)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-04-28T13:42:35Z] <lucaswerkmeister-wmde@deploy1003> Finished scap sync-world: Backport for [[gerrit:1278435|testwiki: allow sysops to add/remove electionadmin (T423962)]] (duration: 07m 37s)

Novem_Linguae claimed this task.