jkomoros / card-web

The web app behind thecompendium.cards
Apache License 2.0
46 stars 8 forks source link

Non logged in users see an edit button #521

Closed jkomoros closed 3 years ago

jkomoros commented 3 years ago

Not clear when this broke. They shouldn't be able to edit anything, but that button shouldn't show up.

jkomoros commented 3 years ago

A bisect went back to the point where the current data doesn't even work, so it's been around for awhile

jkomoros commented 3 years ago

Wait, the logic for selectCardIDsUserMayEdit looks totally broken, it operates as though it's working on a single card but takes all cards?

Ah, no, it's a createObjectSelector so it actually does plausibly behave correctly.

jkomoros commented 3 years ago

This was broken in f56e68ce3a504d427da11909b4d6e0a08f74d1b1 where the card.author != uid check is backwards