Page MenuHomePhabricator

Update User access to polls on SecurePoll
Closed, ResolvedPublic1 Estimated Story Points

Description

Following the introduction of temporary users T326816, the following checks need to be updated to consider the case of temp accounts.

LocalAuth::autoLogin()
$user->isAnon becomes !$user->isNamed()
Prevents Anon and Temp users to vote

APIStrikeVote::execute()
!$user->isRegistered() becomes !$user->isNamed()
Prevents Anon and Temp user to vote

Acceptance criteria:
Temporary users cannot vote

Documentation:
https://office.wikimedia.org/wiki/Product/IP_Masking#How_should_I_update_my_code?

Event Timeline

Change 908596 had a related patch set uploaded (by AGueyte; author: AGueyte):

[mediawiki/extensions/SecurePoll@master] Update User checks

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

AGueyte renamed this task from Update User conditions on SecurePoll to Update User access to polls on SecurePoll.Apr 13 2023, 4:55 PM

Change 908596 merged by jenkins-bot:

[mediawiki/extensions/SecurePoll@master] Update User access to polls

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

@AGueyte In the AC, you meant it's currently "You must log in to vote in this election" as seen in the screenshots below or was it supposed to say something else?

T334597_SecurePoll_TempVoting.png (1×3 px, 248 KB)

T334597_SecurePoll_LoggedOutVoting.png (1×3 px, 224 KB)

I have edited the description, and we have decided to keep the same error message for now!
So this is correct.

Ok sounds good, I'll move this to Done as stated from https://phabricator.wikimedia.org/T334597#8787720. Thanks for the work!

OS: macOS 13.3
Browser: Chrome 112, Firefox 111, Safari 16.4
Test site: http://localhost:8080/wiki/Special:SecurePoll