Events 3.3.0, Accounts 1.3.0, contracts 1.11.0: Accounts looks like Events, backups; sign-out and upload fixes

- Accounts: account and admin pages in Cross Events' layout (top bar, sidebar,
  a page per section, dark footer); quick links to the church's sites
  (GET /me/apps); nightly pg_dump backups with Admin -> Backups (run, keep,
  download, audited; heartbeat lastBackupAt); a fuller built-in privacy notice
  with headings and bullets; a fixed favicon. /backups/ ignored (anchored, so
  src/backups is kept).
- Contracts 1.11.0: people.removeDemo (only @example.com, never an admin).
- Events: uploads served from the folder they're saved in (a backend started
  outside backend/ answered 404 for a logo it had just saved); Branding checks
  the file loads before saving; logout waits for the sign-out call so Accounts
  signs out too; set-demo removes the last demo's people from Accounts.
Tests: Accounts 62 + e2e 8, Events 782, contracts 225; npm run check passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-20 11:19:57 +02:00
co-authored by Claude Opus 5.5
parent 8ee64bb9c9
commit 8856d6b35d
61 changed files with 1514 additions and 162 deletions
+40
View File
@@ -1,5 +1,45 @@
# Changelog — Accounts
## [1.3.0] - 2026-11-20
Needs contracts 1.11.0 (`people.removeDemo`). Works with every Cross Events 3.x.
### Added
- **Backups** (Admin → Backups, `src/backups/backups.ts`): a gzipped `pg_dump` every night at
02:00 (job `backup`) and on "Back up now", into `backend/backups/` with the names the
`crosscode` script already gives its pre-deploy dumps (`accounts-YYYYMMDD-HHMMSS.sql.gz`), so
both show in one list. Keeps the newest 14 by default (`backup_retain_count`), nightly can be
turned off (`backup_nightly`), downloads are admin-only and audited, a failed dump leaves no file
and shows why (`backup_last_error`). The heartbeat's `lastBackupAt` is the newest backup.
Needs `pg_dump` (the PostgreSQL client) on the server, as the crosscode script does.
- **Quick links to the church's sites** on the account page (`GET /api/v2/me/apps`): each
connected product; Events opens its dashboard through its own sign-in (no second sign-in).
- `people.removeDemo` (contracts 1.11.0): a product's old demo people (`@example.com`, known
through that product, not admins) are signed out everywhere and anonymised; the reply says which
were kept and why.
- A favicon (`app/icon.svg`), the same for every church.
### Changed
- **The account and admin pages look like Cross Events' dashboard:** the church's logo and name in
a top bar, a sidebar with the person, their role and the sections, panels with icon tiles, and a
dark footer. Each section has its own address: `/account` (overview), `/account/details`,
`/security`, `/privacy`, `/activity`; `/admin` (people), `/admin/deletions`, `/church`,
`/linked`, `/signin`, `/messages`, `/notice`, `/backups`, `/licence`, `/audit`. The
"your data is ready" email's link (`/account/privacy`) now opens the right section. Sign-in pages
keep their centred card.
- **The built-in privacy notice** is rewritten in sections, as Cross Events' policy: what's kept,
how it's used, who sees it (the church's sites, admins, email and WhatsApp providers, aggregate
totals to Cross Code), where and how long (including backups), cookies, POPIA rights, children,
changes and contact. A line starting "## " is a heading and "• " a bullet, on the privacy page,
the sign-in step and the admin's preview. Churches still on the built-in notice see the new text
as version 1 (it describes the same practice more fully); Admin → Privacy notice can start a new
version from it, which asks everyone to read it again.
### Fixed
- `backend/.gitignore` ignores `/backups/` (the dumps the crosscode script makes).
## [1.2.0] - 2026-11-19
Found after a church moved Cross Events' sign-in here without email set up in Accounts: every