Switch to signed cookie auth and stop leaking player IDs

This commit is contained in:
2026-02-05 16:28:22 +01:00
parent 67453d0756
commit a6265e8656
12 changed files with 100 additions and 84 deletions

View File

@@ -85,7 +85,6 @@ export function signatureSuggestions(list) {
return JSON.stringify(
list.map((s) => [
s.id,
s.playerId,
s.name,
s.genre,
s.description,
@@ -95,6 +94,7 @@ export function signatureSuggestions(list) {
s.minPlayers,
s.maxPlayers,
s.parentSuggestionId,
s.isOwner,
]),
);
}

View File

@@ -147,7 +147,7 @@ export function renderVotes() {
state.myVotes.map((v) => [v.suggestionId, v.score]),
);
sortByName(state.allSuggestions).forEach((s) => {
const canEdit = !!state.me?.isAdmin || s.playerId === state.me?.id;
const canEdit = !!state.me?.isAdmin || s.isOwner;
const lockTitle = state.phase !== "Suggest" && !state.me?.isAdmin;
const li = buildCard(s, {
showAuthor: true,