iftechfoundation / ifdb

The software behind the Interactive Fiction Database (IFDB)
Other
23 stars 18 forks source link

Hide sandboxed poll votes on /viewgame and /allpolls #318

Closed Keltena closed 1 month ago

Keltena commented 1 month ago

Poll pages already hide votes from sandboxed users (see PR #175: Sandbox polls). However, game pages still list polls on the basis of these hidden votes. This pull request adds code to check voters' sandbox status before counting their votes on /viewgame and /allpolls.

(Tested by sandboxing the test user, since actual sandboxed users don't seem to exist in the backup database. To test on the actual site, visit https://ifdb.org/allpolls?game=xf5y04yekcrqtnc — you should see 17 rather than 20 polls, and should not see the polls Misunderstood Games, For Your Consideration - XYZZY-eligible writing of 2015 - an IFDB Poll, or For Your Consideration - XYZZY-eligible implementations of 2015 - an IFDB Poll.)

dfabulich commented 1 month ago

This is going to conflict with PR #314… I'll try to land that promptly and then we'll resolve the conflict.

dfabulich commented 1 month ago

314 is merged. The conflict arose because I moved sections of the page around; LMK if you need a hand resolving the conflict.

dfabulich commented 1 month ago

Filed https://github.com/Keltena/ifdb/pull/1 on this