diff --git a/.env.example b/.env.example index 983d8d4..ce16fb5 100644 --- a/.env.example +++ b/.env.example @@ -9,6 +9,8 @@ CARDS_DB_PATH=/var/lib/sokko-g/cards/nebula-cards.sqlite CARDS_PUBLIC_ORIGIN=https://sokkog.example.com # Adresse e-mail publique affichée dans la notice de confidentialité ; obligatoire pour activer le jeu en production. CARDS_PRIVACY_CONTACT= +# Nom du responsable des données, affiché publiquement dans la même notice ; obligatoire pour activer le jeu en production. +CARDS_PRIVACY_CONTROLLER= DISCORD_CLIENT_ID= DISCORD_CLIENT_SECRET= DISCORD_REDIRECT_URI=https://sokkog.example.com/api/cards/auth/callback diff --git a/docs/DELIVERY.md b/docs/DELIVERY.md index 2c44c6d..3090a3b 100644 --- a/docs/DELIVERY.md +++ b/docs/DELIVERY.md @@ -189,6 +189,8 @@ Les prérequis d'activation sont : - `CARDS_PRIVACY_CONTACT`, l'adresse e-mail publique affichée dans la notice de confidentialité. Elle reste hors du dépôt, mais tout visiteur peut la lire : préférer une adresse dédiée ; +- `CARDS_PRIVACY_CONTROLLER`, le nom du responsable des données, affiché lui aussi + publiquement dans cette notice ; - `CARDS_ADMIN_DISCORD_IDS` limité aux identifiants Discord autorisés ; - la cadence de recharge, l'ouverture des paquets et les taux de tirage ne passent plus par l'environnement : ils se règlent depuis l'administration diff --git a/docs/STORAGE_SCHEMA.md b/docs/STORAGE_SCHEMA.md index 50ddec3..f218606 100644 --- a/docs/STORAGE_SCHEMA.md +++ b/docs/STORAGE_SCHEMA.md @@ -24,6 +24,10 @@ Collections, ouvertures et transferts : nom « Joueur supprimé », avatar et soldes remis à zéro). Elle reste car ouvertures, transferts, réclamations de codes et journaux la référencent. Le compte disparaît des listes de joueurs ; une reconnexion Discord crée un compte neuf. +- `players.last_login_at` (migration 6) : dernière connexion Discord. + `CardsService.runMaintenance`, lancé au démarrage puis chaque jour, applique la même + anonymisation aux comptes non administrateurs sans connexion depuis 730 jours et + purge les sessions expirées et les clés d'idempotence de plus de 30 jours. - `collection_cards(player_id, edition_id, quantity, acquired_at)` : une ligne par carte possédée, avec sa quantité (≥ 1). Les exemplaires n'ont pas d'identité propre et aucune carte n'est « non échangeable ». diff --git a/scripts/start-cards-e2e-server.mjs b/scripts/start-cards-e2e-server.mjs index c7aa79d..20e32e8 100644 --- a/scripts/start-cards-e2e-server.mjs +++ b/scripts/start-cards-e2e-server.mjs @@ -11,6 +11,7 @@ process.env.CARDS_DEV_AUTH = "true"; process.env.CARDS_DB_PATH = join(directory, "cards.sqlite"); process.env.CARDS_PUBLIC_ORIGIN = `http://127.0.0.1:${process.env.PORT}`; process.env.CARDS_PRIVACY_CONTACT = "privacy@example.invalid"; +process.env.CARDS_PRIVACY_CONTROLLER = "Exploitant E2E"; // Rend le bouton Discord visible ; les parcours ne le suivent jamais jusqu'à Discord. process.env.DISCORD_CLIENT_ID = "e2e-client"; process.env.DISCORD_CLIENT_SECRET = "e2e-secret"; diff --git a/services/cards/api.js b/services/cards/api.js index 311e7c9..fc21954 100644 --- a/services/cards/api.js +++ b/services/cards/api.js @@ -7,6 +7,7 @@ import { CardsService, DEV_DISCORD_ID } from "./service.js"; const JSON_LIMIT = 64 * 1024; const DISCORD_TIMEOUT_MS = 10_000; +const MAINTENANCE_INTERVAL_MS = 24 * 60 * 60 * 1000; const EMAIL_PATTERN = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; function bool(value, fallback = false) { @@ -134,6 +135,7 @@ export function createCardsApiHandler({ if (requestedDevAuth && !devAuth) console.error("CARDS_DEV_AUTH is ignored in production."); const configuredContact = String(env.CARDS_PRIVACY_CONTACT || "").trim(); const privacyContact = EMAIL_PATTERN.test(configuredContact) ? configuredContact : null; + const privacyController = String(env.CARDS_PRIVACY_CONTROLLER || "").trim() || null; let database = null; let service = null; if (enabled) { @@ -142,6 +144,7 @@ export function createCardsApiHandler({ if (env.NODE_ENV === "production" && !env.CARDS_PUBLIC_ORIGIN) throw new TypeError("CARDS_PUBLIC_ORIGIN is required when Sokko TCG is enabled in production."); // La notice de confidentialité doit indiquer à qui s'adresser avant d'ouvrir le jeu à de vrais comptes. if (env.NODE_ENV === "production" && !privacyContact) throw new TypeError("CARDS_PRIVACY_CONTACT must be a valid e-mail address when Sokko TCG is enabled in production."); + if (env.NODE_ENV === "production" && !privacyController) throw new TypeError("CARDS_PRIVACY_CONTROLLER is required when Sokko TCG is enabled in production."); const catalog = loadCardsCatalog(catalogPath); database = new CardsDatabase(databasePath); service = new CardsService({ database, catalog, now, random, devPerks }); @@ -149,6 +152,15 @@ export function createCardsApiHandler({ const secureCookies = env.NODE_ENV === "production"; const adminIds = new Set(String(env.CARDS_ADMIN_DISCORD_IDS || "").split(",").map((item) => item.trim()).filter(Boolean)); service?.syncAdmins(adminIds, { keepDevAdmin: devAuth }); + service?.runMaintenance(); + const maintenanceTimer = service && setInterval(() => { + try { + service.runMaintenance(); + } catch (error) { + console.error(error); + } + }, MAINTENANCE_INTERVAL_MS); + maintenanceTimer?.unref(); const rateLimit = createRateLimiter(now); const publicOrigin = (req) => env.CARDS_PUBLIC_ORIGIN || requestOrigin(req); const discordCallbackUrl = (req) => env.DISCORD_REDIRECT_URI || `${publicOrigin(req)}/api/cards/auth/callback`; @@ -185,7 +197,8 @@ export function createCardsApiHandler({ devAuth: enabled && devAuth, discordConfigured: enabled && Boolean(env.DISCORD_CLIENT_ID && env.DISCORD_CLIENT_SECRET), catalog: enabled ? publicCatalog(service.catalog) : null, - privacyContact: enabled ? privacyContact : null + privacyContact: enabled ? privacyContact : null, + privacyController: enabled ? privacyController : null }); return true; } @@ -398,7 +411,10 @@ export function createCardsApiHandler({ } } - handler.close = () => database?.close(); + handler.close = () => { + clearInterval(maintenanceTimer); + database?.close(); + }; handler.service = service; return handler; } diff --git a/services/cards/database.js b/services/cards/database.js index affb568..2f47533 100644 --- a/services/cards/database.js +++ b/services/cards/database.js @@ -191,6 +191,11 @@ const MIGRATIONS = [ // Suppression de compte : la ligne du joueur reste, anonymisée, car les ouvertures, échanges et journaux y font référence. ` ALTER TABLE players ADD COLUMN deleted_at INTEGER; + `, + // Dernière connexion Discord : un compte resté 24 mois sans connexion est anonymisé (runMaintenance). + ` + ALTER TABLE players ADD COLUMN last_login_at INTEGER; + UPDATE players SET last_login_at = created_at; ` ]; diff --git a/services/cards/service.js b/services/cards/service.js index b380536..c33f7af 100644 --- a/services/cards/service.js +++ b/services/cards/service.js @@ -38,6 +38,10 @@ const PLAYER_HISTORY_EVENTS = Object.freeze([ ]); const DEV_STARDUST = 1000; const DELETED_PLAYER_NAME = "Joueur supprimé"; +const DAY_MS = 24 * 60 * 60 * 1000; +// Une session dure 30 jours : un joueur actif se reconnecte donc au moins une fois par mois. +const INACTIVE_ACCOUNT_MS = 730 * DAY_MS; +const IDEMPOTENCY_TTL_MS = 30 * DAY_MS; export class CardsService { constructor({ database, catalog, now = Date.now, random, devPerks = false } = {}) { @@ -270,12 +274,12 @@ export class CardsService { let row = this.db.prepare("SELECT * FROM players WHERE discord_id = ?").get(discordId); if (!row) { const id = randomUUID(); - this.db.prepare(`INSERT INTO players(id, discord_id, display_name, avatar_url, is_admin, created_at, openings_balance, recharge_anchor) - VALUES (?, ?, ?, ?, ?, ?, ?, ?)`).run(id, discordId, displayName, avatarUrl, isAdmin ? 1 : 0, now, WELCOME_OPENINGS, now); + this.db.prepare(`INSERT INTO players(id, discord_id, display_name, avatar_url, is_admin, created_at, openings_balance, recharge_anchor, last_login_at) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`).run(id, discordId, displayName, avatarUrl, isAdmin ? 1 : 0, now, WELCOME_OPENINGS, now, now); row = this.db.prepare("SELECT * FROM players WHERE id = ?").get(id); this.audit(id, "welcome_opening", id, { amount: WELCOME_OPENINGS }); } else { - this.db.prepare("UPDATE players SET display_name = ?, avatar_url = ?, is_admin = ? WHERE id = ?").run(displayName, avatarUrl, isAdmin ? 1 : 0, row.id); + this.db.prepare("UPDATE players SET display_name = ?, avatar_url = ?, is_admin = ?, last_login_at = ? WHERE id = ?").run(displayName, avatarUrl, isAdmin ? 1 : 0, now, row.id); row = this.db.prepare("SELECT * FROM players WHERE id = ?").get(row.id); } return publicPlayer(row); @@ -691,22 +695,36 @@ export class CardsService { deleteAccount(playerId) { this.database.transaction(() => { if (!this.db.prepare("SELECT 1 FROM players WHERE id = ? AND deleted_at IS NULL").get(playerId)) fail(404, "PLAYER_NOT_FOUND", "Profil introuvable."); - for (const transfer of this.db.prepare("SELECT * FROM transfers WHERE status = 'open' AND (initiator_id = ?1 OR recipient_id = ?1)").all(playerId)) { - this.db.prepare("UPDATE transfers SET status = 'cancelled' WHERE id = ?").run(transfer.id); - const initiatorLeft = transfer.initiator_id === playerId; - this.audit(initiatorLeft ? transfer.recipient_id : transfer.initiator_id, "trade_cancelled", transfer.id, initiatorLeft - ? { sent: transfer.requested_edition_id, received: transfer.offered_edition_id } - : { sent: transfer.offered_edition_id, received: transfer.requested_edition_id }); - } - this.db.prepare("UPDATE openings SET status = 'completed', completed_at = ? WHERE player_id = ? AND status = 'pending'").run(this.now(), playerId); - for (const table of ["sessions", "collection_cards", "favorites", "idempotency"]) this.db.prepare(`DELETE FROM ${table} WHERE player_id = ?`).run(playerId); - this.db.prepare("DELETE FROM gift_packs WHERE player_id = ? AND opening_id IS NULL").run(playerId); - this.db.prepare(`UPDATE players SET discord_id = ?, display_name = ?, avatar_url = '', is_admin = 0, openings_balance = 0, recharge_anchor = NULL, stardust = 0, purchased_openings = 0, deleted_at = ? WHERE id = ?`) - .run(`deleted:${randomUUID()}`, DELETED_PLAYER_NAME, this.now(), playerId); - this.audit(playerId, "account_deleted", playerId, {}); + this.anonymizeAccount(playerId, {}); }); } + // Tâches périodiques sans lien avec une requête : comptes inactifs, sessions expirées, anciennes clés d'idempotence. Les administrateurs ne sont jamais anonymisés. + runMaintenance() { + const now = this.now(); + this.database.transaction(() => { + for (const { id } of this.db.prepare("SELECT id FROM players WHERE deleted_at IS NULL AND is_admin = 0 AND last_login_at <= ?").all(now - INACTIVE_ACCOUNT_MS)) this.anonymizeAccount(id, { reason: "inactivity" }); + this.db.prepare("DELETE FROM sessions WHERE expires_at <= ?").run(now); + this.db.prepare("DELETE FROM idempotency WHERE created_at <= ?").run(now - IDEMPOTENCY_TTL_MS); + }); + } + + anonymizeAccount(playerId, auditDetails) { + for (const transfer of this.db.prepare("SELECT * FROM transfers WHERE status = 'open' AND (initiator_id = ?1 OR recipient_id = ?1)").all(playerId)) { + this.db.prepare("UPDATE transfers SET status = 'cancelled' WHERE id = ?").run(transfer.id); + const initiatorLeft = transfer.initiator_id === playerId; + this.audit(initiatorLeft ? transfer.recipient_id : transfer.initiator_id, "trade_cancelled", transfer.id, initiatorLeft + ? { sent: transfer.requested_edition_id, received: transfer.offered_edition_id } + : { sent: transfer.offered_edition_id, received: transfer.requested_edition_id }); + } + this.db.prepare("UPDATE openings SET status = 'completed', completed_at = ? WHERE player_id = ? AND status = 'pending'").run(this.now(), playerId); + for (const table of ["sessions", "collection_cards", "favorites", "idempotency"]) this.db.prepare(`DELETE FROM ${table} WHERE player_id = ?`).run(playerId); + this.db.prepare("DELETE FROM gift_packs WHERE player_id = ? AND opening_id IS NULL").run(playerId); + this.db.prepare(`UPDATE players SET discord_id = ?, display_name = ?, avatar_url = '', is_admin = 0, openings_balance = 0, recharge_anchor = NULL, stardust = 0, purchased_openings = 0, deleted_at = ? WHERE id = ?`) + .run(`deleted:${randomUUID()}`, DELETED_PLAYER_NAME, this.now(), playerId); + this.audit(playerId, "account_deleted", playerId, auditDetails); + } + // Un don arrive immédiatement. Un échange réserve le doublon proposé jusqu'à la réponse, l'annulation ou l'expiration. createTransfer(playerId, { type, recipientId, editionId, requestedEditionId = null } = {}) { if (!["trade", "gift"].includes(type)) fail(400, "TRANSFER_TYPE", "Type de transfert invalide."); diff --git a/tests/helpers/data-validation.mjs b/tests/helpers/data-validation.mjs index 3ed7837..8575c2e 100644 --- a/tests/helpers/data-validation.mjs +++ b/tests/helpers/data-validation.mjs @@ -198,7 +198,7 @@ export function validateSiteContent(site) { "cards.collection.resetFilters", "cards.history.pendingCards", ...["eyebrow", "title", "description", "summaryTitle", "summaryName", "summaryCards", "summaryOpenings", "deleteTitle", "deleteText", "deleteButton", "confirmTitle", "confirmMessage", "confirmLabel", "deleted"].map((key) => `cards.account.${key}`), - ...["title", "intro", "collectedTitle", "collected", "purposeTitle", "purpose", "visibilityTitle", "visibility", "retentionTitle", "retention", "rightsTitle", "rights", "contactLabel", "contactMissing"].map((key) => `cards.privacy.${key}`), + ...["title", "intro", "collectedTitle", "collected", "purposeTitle", "purpose", "visibilityTitle", "visibility", "retentionTitle", "retention", "rightsTitle", "rights", "controllerLabel", "controllerMissing", "contactLabel", "contactMissing"].map((key) => `cards.privacy.${key}`), "cards.recycling.barLabel", "cards.recycling.viewDuplicates", "cards.recycling.viewAll", diff --git a/tests/nebula-cards-api.test.mjs b/tests/nebula-cards-api.test.mjs index d391378..a0668f1 100644 --- a/tests/nebula-cards-api.test.mjs +++ b/tests/nebula-cards-api.test.mjs @@ -241,7 +241,7 @@ test("development login cannot be enabled in production by configuration alone", const logged = []; console.error = (...values) => logged.push(values.join(" ")); t.after(() => { console.error = originalError; }); - const env = { NODE_ENV: "production", CARDS_ENABLED: "true", CARDS_DEV_AUTH: "true", CARDS_DB_PATH: ":memory:", CARDS_PUBLIC_ORIGIN: "https://cards.invalid", CARDS_PRIVACY_CONTACT: "privacy@example.invalid" }; + const env = { NODE_ENV: "production", CARDS_ENABLED: "true", CARDS_DEV_AUTH: "true", CARDS_DB_PATH: ":memory:", CARDS_PUBLIC_ORIGIN: "https://cards.invalid", CARDS_PRIVACY_CONTACT: "privacy@example.invalid", CARDS_PRIVACY_CONTROLLER: "Exploitant de test" }; const refused = createCardsApiHandler({ projectRoot: resolve("."), env }); t.after(() => refused.close()); assert.equal((await call(refused, { path: "/api/cards/config" })).json.devAuth, false); @@ -280,16 +280,23 @@ test("the administrator list is applied to existing accounts at startup", async }); test("the privacy contact is published only when valid and required to enable the game in production", async (t) => { - const base = { NODE_ENV: "production", CARDS_DB_PATH: ":memory:", CARDS_PUBLIC_ORIGIN: "https://cards.invalid" }; + const base = { NODE_ENV: "production", CARDS_DB_PATH: ":memory:", CARDS_PUBLIC_ORIGIN: "https://cards.invalid", CARDS_PRIVACY_CONTROLLER: "Exploitant de test" }; for (const contact of [undefined, "", "not-an-email"]) { assert.throws(() => createCardsApiHandler({ projectRoot: resolve("."), enabled: true, env: { ...base, CARDS_PRIVACY_CONTACT: contact } }), /CARDS_PRIVACY_CONTACT/); } + for (const controller of [undefined, " "]) { + assert.throws(() => createCardsApiHandler({ projectRoot: resolve("."), enabled: true, env: { ...base, CARDS_PRIVACY_CONTACT: "privacy@example.invalid", CARDS_PRIVACY_CONTROLLER: controller } }), /CARDS_PRIVACY_CONTROLLER/); + } const disabled = createCardsApiHandler({ projectRoot: resolve("."), enabled: false, env: { ...base, CARDS_PRIVACY_CONTACT: "privacy@example.invalid" } }); - assert.equal((await call(disabled, { path: "/api/cards/config" })).json.privacyContact, null); + const disabledConfig = (await call(disabled, { path: "/api/cards/config" })).json; + assert.equal(disabledConfig.privacyContact, null); + assert.equal(disabledConfig.privacyController, null); const handler = createCardsApiHandler({ projectRoot: resolve("."), enabled: true, env: { ...base, CARDS_PRIVACY_CONTACT: "privacy@example.invalid" } }); t.after(() => handler.close()); - assert.equal((await call(handler, { path: "/api/cards/config" })).json.privacyContact, "privacy@example.invalid"); + const config = (await call(handler, { path: "/api/cards/config" })).json; + assert.equal(config.privacyContact, "privacy@example.invalid"); + assert.equal(config.privacyController, "Exploitant de test"); const development = createCardsApiHandler({ projectRoot: resolve("."), enabled: true, databasePath: ":memory:", env: { NODE_ENV: "test" } }); t.after(() => development.close()); diff --git a/tests/nebula-cards.test.mjs b/tests/nebula-cards.test.mjs index 14b3adc..10f7a12 100644 --- a/tests/nebula-cards.test.mjs +++ b/tests/nebula-cards.test.mjs @@ -765,6 +765,50 @@ test("deleting an account erases the identity and possessions but keeps shared h database.close(); }); +test("maintenance anonymises long inactive accounts and purges expired technical data", () => { + const day = 24 * 60 * 60 * 1000; + let now = 1_800_000_000_000; + const database = new CardsDatabase(":memory:"); + const service = new CardsService({ database, catalog: baseCatalog, now: () => now, random: () => 0 }); + const stale = service.upsertPlayer({ discordId: "stale", displayName: "Stale" }); + const returning = service.upsertPlayer({ discordId: "returning", displayName: "Returning" }); + const admin = service.upsertPlayer({ discordId: "admin", displayName: "Admin", isAdmin: true }); + service.addCard(stale.id, "aurora-wolf-standard"); + const expiredSession = service.createSession(stale.id); + const { opening } = service.openPack(returning.id, "primordial-nebula", "old-key"); + service.completeOpening(returning.id, opening.id); + + // Une reconnexion juste avant le seuil repousse l'échéance. + now += 400 * day; + service.upsertPlayer({ discordId: "returning", displayName: "Returning" }); + service.runMaintenance(); + assert.equal(database.db.prepare("SELECT COUNT(*) AS count FROM sessions WHERE player_id = ?").get(stale.id).count, 0, "expired session"); + assert.equal(database.db.prepare("SELECT COUNT(*) AS count FROM idempotency").get().count, 0, "old idempotency key"); + assert.equal(database.db.prepare("SELECT deleted_at FROM players WHERE id = ?").get(stale.id).deleted_at, null); + assert.equal(service.getSession(expiredSession.token), null); + + now += 330 * day - 1; + service.runMaintenance(); + assert.equal(database.db.prepare("SELECT deleted_at FROM players WHERE id = ?").get(stale.id).deleted_at, null, "just before the threshold"); + + now += 1; + service.runMaintenance(); + const anonymised = database.db.prepare("SELECT * FROM players WHERE id = ?").get(stale.id); + assert.equal(anonymised.deleted_at, now); + assert.equal(anonymised.display_name, "Joueur supprimé"); + assert.equal(anonymised.discord_id.startsWith("deleted:"), true); + assert.equal(database.db.prepare("SELECT COUNT(*) AS count FROM collection_cards WHERE player_id = ?").get(stale.id).count, 0); + assert.deepEqual(JSON.parse(database.db.prepare("SELECT details_json FROM audit_log WHERE player_id = ? AND event_type = 'account_deleted'").get(stale.id).details_json), { reason: "inactivity" }); + assert.equal(database.db.prepare("SELECT deleted_at FROM players WHERE id = ?").get(returning.id).deleted_at, null); + assert.equal(database.db.prepare("SELECT deleted_at FROM players WHERE id = ?").get(admin.id).deleted_at, null); + + const logCount = () => database.db.prepare("SELECT COUNT(*) AS count FROM audit_log").get().count; + const before = logCount(); + service.runMaintenance(); + assert.equal(logCount(), before); + database.close(); +}); + test("restoring replaces the database even when the stopped service left a write-ahead log", async () => { const directory = await mkdtemp(join(tmpdir(), "sokko-cards-restore-wal-")); const live = join(directory, "live.sqlite"); diff --git a/website/public/data/site.json b/website/public/data/site.json index ba9f41c..a6be6dc 100644 --- a/website/public/data/site.json +++ b/website/public/data/site.json @@ -149,9 +149,11 @@ "visibilityTitle": "Visibilité", "visibility": "Les joueurs connectés voient votre pseudo, votre avatar et vos doublons disponibles, afin de vous proposer des dons et des échanges. Le reste de votre collection n’est pas partagé.", "retentionTitle": "Durée de conservation", - "retention": "Vos données sont conservées tant que votre compte existe. Après sa suppression, elles disparaissent des sauvegardes sous 14 jours.", + "retention": "Vos données sont conservées tant que votre compte existe. Après 24 mois sans connexion, il est anonymisé automatiquement et votre collection est effacée. Après une suppression ou une anonymisation, ces données disparaissent des sauvegardes sous 14 jours.", "rightsTitle": "Vos droits", "rights": "Vous pouvez supprimer votre compte depuis la section Compte, et demander l’accès à vos données ou leur correction à l’adresse ci-dessous. Vous pouvez aussi saisir la CNIL.", + "controllerLabel": "Responsable des données", + "controllerMissing": "Responsable non configuré sur ce serveur.", "contactLabel": "Contact", "contactMissing": "Contact non configuré sur ce serveur." }, diff --git a/website/src/features/cards/AccountPanel.jsx b/website/src/features/cards/AccountPanel.jsx index 07dc4a3..45ca967 100644 --- a/website/src/features/cards/AccountPanel.jsx +++ b/website/src/features/cards/AccountPanel.jsx @@ -3,7 +3,7 @@ import { useState } from "react"; import { ConfirmModal } from "../../components/ToolboxModals.jsx"; import { PrivacyNotice } from "./PrivacyNotice.jsx"; -export function AccountPanel({ state, busy, content, privacy, privacyContact, onDelete }) { +export function AccountPanel({ state, busy, content, privacy, privacyContact, privacyController, onDelete }) { const [confirming, setConfirming] = useState(false); const cards = state.collection.reduce((total, entry) => total + entry.quantity, 0); return
{content.account.deleted}
}{content.intro}
{SECTIONS.map((section) =>{content[section]}
{content.controllerLabel} {controller || content.controllerMissing}
{content.contactLabel} {contact ? {contact} : content.contactMissing}