Campus-scoped staff: help, docs, changelog (1.44.0)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Handover — where things stand and how to carry on
|
||||
|
||||
Last updated: 2026-10-27, after **1.43.0** (and Hub 1.1.0). The plan itself is in
|
||||
Last updated: 2026-10-27, after **1.44.0** (and Hub 1.1.0). The plan itself is in
|
||||
[ROADMAP-v2.md](./ROADMAP-v2.md) (decisions table at the end); the previous round of
|
||||
features is in [FEATURES-ROUND-1.md](./FEATURES-ROUND-1.md).
|
||||
|
||||
@@ -14,6 +14,7 @@ encrypted settings unreadable or break existing installs.
|
||||
|
||||
| Version | What |
|
||||
|---------|------|
|
||||
| 1.44.0 | **Campus-scoped staff** (§12 part 2): Admin → Users "Limit to campuses"; `utils/campusScope.js` on every staff/supervisor route (and owner-or-staff routes), lists filtered, scanner names the other campus, church-wide events view/scan/door-only for scoped staff; route test `tests/campusScopeRoutes.test.js` |
|
||||
| 1.43.0 | **Campuses** (§12 part 1): Site settings → Campuses (off by default), events per campus or all campuses, public campus filter (remembered, starts on home campus) and `/campus/<slug>` pages, home campus on the profile, campus filters on Reports and the dashboards, "Everyone at a campus" in broadcasts, campus summary recipients, campus on ticket PDFs, heartbeat `campusCount`. Also adds the `hub_update_requested` audit action missing since 1.42.0 |
|
||||
| 1.42.1 | Production Hub public key built in (`publicKey.js`); `HUB_PUBLIC_KEY` only needed for a local Hub |
|
||||
| 1.42.0 | **Request update** instead of the deploy command: Site settings → Licence sends a signed update request to the Hub (protocol §3a), which opens an alert and emails Joshua; "Update requested on …" until the site runs that version, and the admin update banner hides meanwhile. Audit action `hub_update_requested`. Needs Hub 1.1.0 |
|
||||
@@ -43,10 +44,7 @@ encrypted settings unreadable or break existing installs.
|
||||
request). A 1.42.0 site talking to an older Hub shows "The Hub doesn't take update requests yet".
|
||||
2. **Try `scripts/install.sh` on a test server.** The production Hub key is built in since
|
||||
1.42.1, so a fresh install needs no `HUB_PUBLIC_KEY`; existing installs can drop it from `.env`.
|
||||
3. **1.44.0 — Campus-scoped staff** (§12, "Plumbing (1.44.0)"): `UserCampusScope`, a
|
||||
`utils/campusScope.js` helper on every staff/supervisor endpoint (115 in 27 route files at
|
||||
1.42.1), and the route-list test that fails on any endpoint that isn't campus-checked or marked
|
||||
campus-independent.
|
||||
3. **1.45.0 — Kids check-in** (§4), then 1.46.0 volunteer rosters (§5) — both per campus.
|
||||
|
||||
## Working on this repo
|
||||
|
||||
@@ -212,6 +210,26 @@ encrypted settings unreadable or break existing installs.
|
||||
- e2e: the campuses and two events' campuses are **seeded** in `e2e/support/prepare-db.js` with
|
||||
campuses off (so a pre-built frontend already has them); `campuses.spec.ts` turns them on and off.
|
||||
|
||||
## Campus-scoped staff (1.44.0) — adding a staff route
|
||||
|
||||
- **Every route behind `staff` or `supervisor` must carry a marker from `utils/campusScope.js`**, or
|
||||
`tests/campusScopeRoutes.test.js` fails:
|
||||
- `scopeEvent({ resolve, from, need, ownerOk, nameCampus })` — one event, or a record traced to
|
||||
one (`RESOLVERS`: registration, ticket, ticketQr, payment, eventOption, optionVariant, bundle,
|
||||
allocationSet/Group, waitlistEntry, scanLock, syncReport, section, certificate, consentRequest).
|
||||
`need: 'manage'` for setup, cashup and refunds (church-wide events refused).
|
||||
- `scopeBody([[field, resolver], …], { need, orphan })` — records named in the body (lists of ids
|
||||
too); `orphan: 'deny'` when there must be an event (payments).
|
||||
- `scopeList` — the controller filters with `listWhere(req, path)` / `withScope(where, extra)`
|
||||
(never spread a scope `where` over one that has its own OR) or checks itself.
|
||||
- `unscopedOnly`, `campusIndependent('reason')`, `scopeBroadcast({ freeformField })`.
|
||||
- Routes open to the owner *and* staff (no role middleware, so the test can't see them) need
|
||||
`scopeEvent({ …, ownerOk: true })` by hand — registrations, payments, tickets, consent requests
|
||||
and coupon validation have it.
|
||||
- Rules: admins never scoped; scopes ignored while campuses are off; another campus → 404, except
|
||||
the scanner (403 naming the campus). Tested in `tests/campusScope.test.js` and e2e
|
||||
`campus-scoped.spec.ts` (staff and supervisor scoped to E2E South; a seeded North ticket).
|
||||
|
||||
## Known gaps / follow-ups
|
||||
|
||||
- WhatsApp STOP only works once someone pastes the webhook URL from Site settings → WhatsApp
|
||||
|
||||
@@ -28,8 +28,9 @@ Cross Events Hub); 1.42.0 **Request update** button instead of the deploy comman
|
||||
(update requests); 1.42.1 the production Hub key built in. Later versions moved up by one
|
||||
(2026-10-27). Multi-campus is split in two — 1.43.0 campuses, 1.44.0 campus-scoped staff — so
|
||||
everything after moves up by one more (2026-10-27). 1.43.0 **campuses** shipped (settings, events
|
||||
per campus, public filter and campus pages, home campus, filters, campus broadcasts and summaries).
|
||||
**Next: 1.44.0 Campus-scoped staff.**
|
||||
per campus, public filter and campus pages, home campus, filters, campus broadcasts and summaries);
|
||||
1.44.0 **campus-scoped staff** shipped (Admin → Users "Limit to campuses", every staff route checked).
|
||||
**Next: 1.45.0 Kids check-in.**
|
||||
|
||||
**Repositories:**
|
||||
|
||||
@@ -932,7 +933,7 @@ income justify the hardware:
|
||||
| 4 | 1.36.0 ✅ – 1.37.2 | Payment provider interface (Yoco moved behind it) → PayFast, then hiding "Pay online" when it can't be used and payment status checks (SnapScan and Zapper dropped) | Payment code gets split out of the big controller as part of this |
|
||||
| 5 | 1.38.0 ✅ 1.39.0 ✅ 1.40.0 ✅ | **POPIA toolkit** (1.38.0: user privacy centre, unsubscribe, WhatsApp STOP, data requests inbox; 1.39.0: privacy notice editor + versions, operator register, consent log, access log; 1.40.0: retention jobs, breach register, children’s-data flags, readiness page) | Main selling point; retention jobs use the job queue |
|
||||
| 6 | 1.41.0 ✅ – 1.42.0 ✅ + Hub 1.0 ✅ – 1.1 ✅ | Install/update scripts, `/health`, licence step in `/setup`, "Connect to Hub", heartbeat, licence states — plus the **Hub** app (separate repo); rename to Cross Events (1.41.3); Request update (1.42.0 / Hub 1.1.0) | Must exist before the first church is sold; Hope Family Church registers as install #1 |
|
||||
| 7 | 1.43.0 ✅ – 1.44.0 | **Multi-campus**: 1.43.0 campuses (settings, events, public filter and landing pages, home campus, filters, messages, summaries); 1.44.0 campus-scoped staff | Kids rooms and volunteer roles are per campus, so campuses come first; scoping is split out because it's security-heavy |
|
||||
| 7 | 1.43.0 ✅ – 1.44.0 ✅ | **Multi-campus**: 1.43.0 campuses (settings, events, public filter and landing pages, home campus, filters, messages, summaries); 1.44.0 campus-scoped staff | Kids rooms and volunteer roles are per campus, so campuses come first; scoping is split out because it's security-heavy |
|
||||
| 8 | 1.45.0 – 1.46.0 | Kids check-in, Volunteer rosters | Depend on sessions and campuses |
|
||||
| 9 | 1.47.0 – 1.49.0 | Event series & cloning, Wallet passes, Outbound webhooks | Smaller, independent wins |
|
||||
| 10 | 1.50.0 – 1.52.0 | Admin dashboard/Ctrl+K/bulk actions, Afrikaans, Accessibility pass | Polish before the big release |
|
||||
|
||||
Reference in New Issue
Block a user