Privacy notice: built-in text up to date, review flow, acceptance (1.48.1)

The built-in notice now covers volunteer rosters, event series, season
passes, webhooks, how people agree to it, and the provider-notices
storage item. Sites with their own published version see what changed
in the editor (sections marked, use new text per section or all, add
missing sections, "Done - hide this"). Account activation asks for
agreement to the terms and notice; anyone who never accepted is asked
once after login. The cookie button shows above any cookie section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-28 13:15:57 +02:00
co-authored by Claude Opus 5.5
parent aa79168660
commit adb6e11000
27 changed files with 368 additions and 44 deletions
+68 -5
View File
@@ -24,9 +24,9 @@ const DEFAULT_SECTIONS = [
title: 'Plain English Summary',
body: [
"We respect your privacy — here's what you need to know:",
'• We only collect info needed to run events: registrations, payments, tickets, check-in and, for children\'s ministry, kids check-in.',
'• We only collect info needed to run events: registrations, payments, tickets, check-in, volunteer rosters and, for children\'s ministry, kids check-in.',
"• Your information is kept in this site's own database, run by the hosting provider listed in section 9. It isn't shared with other organisations that use the same software.",
"• We don't sell your data, and only share it with the services listed in section 9, which process payments and deliver messages for us.",
"• We don't sell your data, and only share it with the services listed in section 9 — they process payments and deliver messages for us, and any other system we connect (such as church-management software) gets only the updates we chose.",
'• If you register other people or pass a ticket on, we only use the email or phone number you type to contact them. We never show you whether someone has an account with us.',
'• For youth events, a parent or guardian gives consent. Medical details are encrypted, seen only by the event leaders who need them, and deleted shortly after the event.',
"• For kids check-in, parents add their children's details once. Allergies, medical and custody notes are encrypted, shown only to kids-ministry staff, and deleted when a child hasn't been checked in for a while (section 7). Children are collected with a pickup code.",
@@ -53,6 +53,8 @@ const DEFAULT_SECTIONS = [
'• Security records: sign-ins, password changes and similar account events, with the time, IP address and device type, so we can alert you and investigate misuse.',
'• Event information: events you register for, ticket selections (including the sessions you chose on multi-session events), discount codes used, attendee form answers, waitlist requests, ticket check-ins (when your ticket was scanned, per session), room or group allocations, and completion certificates issued to you.',
'• Your home campus, if the organisation has more than one campus and you choose one.',
'• Serving (if you volunteer): the roles and shifts you sign up for or are given, requests to pass a shift on and who took it, when you checked in, and the hours you served.',
'• Event series you follow, and season passes you buy (a season pass registers you for each event on it, so each shows in your registrations).',
"• Kids check-in (if you use it): your family's name, your children's names, dates of birth, gender, allergies, medical notes and custody notes, the adults you allow to collect them (name, phone number, relationship), and each check-in — when, which room, the pickup code, who checked them in and out, and who collected them (see section 8).",
'• Details about other people you register (see section 3), parental consent details for youth events, and children at kids check-in (see section 8).',
'• Payment information: processed by our payment provider (Yoco or PayFast); we receive only payment status, amount and reference numbers. If you sponsor a spot, we record the amount and, unless you give anonymously, the name and message you choose to add.',
@@ -90,6 +92,8 @@ const DEFAULT_SECTIONS = [
'• Send optional reminders before sessions, and issue completion certificates (each has a code anyone can use to check it is genuine: the check shows the name on the certificate and the event).',
'• Check children in and out at kids check-in, send you their pickup code, and ask you to come to the room if a leader needs you.',
'• Show you the events of your home campus first, if the organisation has more than one campus.',
'• Run volunteer rosters: remind you the day before you serve, pass your shift on to someone who accepts it when you can\'t make it, and check you in when you arrive.',
'• Tell you when a new event in a series you follow comes out. This counts as news, so it\'s only sent if you get news and announcements.',
'• Offer places from a waitlist, arrange rooms and groups, and ask for parental consent on youth events.',
'• Send you an optional feedback form after an event, with one reminder.',
'• Manage user accounts and event attendance records, and give support when you ask for help.',
@@ -106,7 +110,7 @@ const DEFAULT_SECTIONS = [
'• Payment receipts.',
'• Your event tickets (as a PDF document).',
'• Security alerts such as new login notifications, password changes, and account closure confirmations, and sign-in codes if you chose WhatsApp for two-factor authentication.',
'• Session reminders, if the event sends them.',
'• Session reminders, if the event sends them, and volunteer reminders the day before you serve.',
'• Kids check-in: your children\'s pickup code, and a request to come to the room if a leader needs you. These never include medical or custody details. If you ask the desk to, the pickup code is also sent to one of your authorised adults.',
'• News and announcements, only if you asked for them on WhatsApp. Reply STOP to any of these to stop them.',
'WhatsApp communications are delivered through WAWP (wawp.net), a third-party WhatsApp Business API provider. Your mobile number is transmitted to WAWP solely for the purpose of delivering your messages.',
@@ -133,6 +137,7 @@ const DEFAULT_SECTIONS = [
'We keep personal information only as long as we need it:',
'{retention}',
"• Ticket lists downloaded to a staff member's scanner for offline check-in are deleted from that device when offline mode is ended.",
'• Copies of the updates sent to connected systems (webhooks, section 9) are kept for 30 days so problems can be checked, then deleted — and straight away when your account is deleted.',
"• Family lists downloaded to a kids check-in desk for offline use stay on that device until the desk is synced and the list is refreshed or removed. Only kids-ministry staff can download them, and each download is recorded.",
'You can ask for your account to be deleted at any time from the Privacy page in your account. Your account is closed straight away, and your personal information — your name and contact details, the people you registered, your form answers — is deleted within 30 days (after any upcoming event you registered for). Payment and registration records are kept without your name, because the law requires us to keep financial records.',
].join('\n'),
@@ -161,10 +166,12 @@ const DEFAULT_SECTIONS = [
'We do not sell or rent your personal information. Outside our organisation, it is shared only with these service providers ("operators"), each only for its purpose:',
'{operators}',
'• Anyone we are required to share it with under South African law.',
'If we connect another system — for example our church-management software — through a webhook, it is listed above with what it receives. It gets only the updates we chose (such as new registrations, payments and check-ins), and never children\'s details from kids check-in.',
'Within our organisation, people see only what they need:',
"• Door staff see a ticket's holder name, ticket type and check-in status when scanning.",
'• Group, room or bus leaders see the names, ages and contact numbers of the people in their group. Medical details from parental consent forms are shown to supervisors only.',
"• Kids-ministry staff see the children checked in, with their allergies, medical and custody notes, the parents' names and phone numbers, and the adults allowed to collect them.",
'• Staff running a volunteer roster see who is serving in each role, their contact details, check-ins and hours. If you ask for someone to take over your shift, your first name, the role and any note you add are shown to the event\x27s other volunteers and others who could take it over.',
'• If the organisation has several campuses, a staff member may be limited to their own campuses\' events.',
'• Supervisors and administrators manage registrations, payments and communication for events. Every export of personal information (reports, attendance registers, lists) is recorded.',
'• Support access: to help with a problem (for example, a ticket not showing), an administrator may view the site as you see it for up to 30 minutes. This is strictly read-only — nothing can be changed, paid, registered or sent on your behalf. A reason must be given, and the session and every page viewed are recorded. The organisation may choose to email you whenever this happens.',
@@ -205,6 +212,7 @@ const DEFAULT_SECTIONS = [
'• hope_events_scan_device, hope_events_offline_lock and the "hope-events-offline-scan" database — on a staff member\'s scanner in offline mode: the device\'s id, the ticket list for the section being scanned, and scans waiting to upload. They are deleted when offline mode is ended. A copy of the scanner page is also cached so it opens without a connection.',
'• hope_events_admin_token, hope_events_admin_user_cache and hope_events_impersonation — only while an administrator is using read-only support access (section 9), and removed when it ends.',
"• hope_events_kids_event and hope_events_kids_room — on a kids check-in device: the event and room last chosen.",
'• cross_events_dismissed_notices — notices from the software provider (such as planned maintenance) that you have closed.',
"• hope_events_kids_device and hope_events_kids_offline_… — on a kids check-in desk in offline mode: the device's id, the list of families and children (with allergies, medical and custody notes), pickup codes kept for the device, and check-ins waiting to sync.",
'Optional — only if you click "Allow" on the cookie notice:',
'• hope_events_analytics_sid — a random, anonymous visit id. With it we count, in our own statistics, how many visitors view an event, start registering, and complete a registration. We record only that step, where the visit came from (for example a short link or campaign link) and the type of device — never your name, IP address or browsing history. Detailed records become anonymous daily totals after 90 days. If you choose "No thanks", nothing is counted and no visit id is created.',
@@ -230,6 +238,7 @@ const DEFAULT_SECTIONS = [
title: '13. Changes to This Notice',
body: [
'We may update this notice from time to time. Each update is published as a new version with its date, and earlier versions stay available on this page.',
'You are asked to agree to this notice when you create an account, or when you activate an account that was made for you (for example when someone registered you, or at the door). If you have never agreed to it — such as an account from before we asked — we ask once, the next time you log in.',
'If a change is significant, we ask you to accept the new version the next time you log in.',
].join('\n'),
},
@@ -253,6 +262,49 @@ const DEFAULT_SECTIONS = [
},
];
/**
* Changes to the built-in text, newest last. A site that published its own version keeps its own
* text, so the editor lists the changes made since the revision it last reviewed
* (`privacy_notice_builtin_reviewed`) and offers the new text section by section.
*/
const BUILT_IN_UPDATES = [
{
revision: '1.48.1',
summary: [
'Volunteer rosters: what is kept about people who serve, reminders, and who sees the roster.',
'Following an event series, and season passes.',
'Webhooks: other systems the organisation connects, what they receive, and that copies are kept 30 days.',
'How people agree to the notice: at sign-up, at account activation, or once after login if they never have.',
'A browser-storage item for closed provider notices.',
],
sections: ['summary', 'information', 'use', 'whatsapp', 'retention', 'sharing', 'cookies', 'changes'],
},
];
const BUILT_IN_REVISION = BUILT_IN_UPDATES[BUILT_IN_UPDATES.length - 1].revision;
const REVIEWED_KEY = 'privacy_notice_builtin_reviewed';
function revisionLess(a, b) {
const pa = String(a || '0').split('.').map(Number);
const pb = String(b || '0').split('.').map(Number);
for (let i = 0; i < 3; i++) if ((pa[i] || 0) !== (pb[i] || 0)) return (pa[i] || 0) < (pb[i] || 0);
return false;
}
/**
* Built-in text changes this site hasn't reviewed yet. None while nothing is published (the site
* shows the built-in text, so it is always current).
*/
async function builtInUpdates(db = prisma) {
if (!(await latestNotice(db))) return [];
const row = await db.appSetting.findUnique({ where: { key: REVIEWED_KEY } });
return BUILT_IN_UPDATES.filter(u => !row?.value || revisionLess(row.value, u.revision));
}
/** The admin has gone through the built-in changes (taken what they want, or not). */
async function markBuiltInReviewed(db = prisma) {
await db.appSetting.upsert({ where: { key: REVIEWED_KEY }, update: { value: BUILT_IN_REVISION }, create: { key: REVIEWED_KEY, value: BUILT_IN_REVISION } });
}
function defaultSections() {
return DEFAULT_SECTIONS.map(s => ({ ...s }));
}
@@ -340,11 +392,17 @@ async function requiredVersion(db = prisma) {
return row ? row.version : null;
}
/** Whether someone must (re-)accept the notice before carrying on. */
/**
* Whether someone must accept the notice before carrying on, and why: 'first' — they never
* accepted any version (an account made for them by staff, at the door or by someone who
* registered them, or from before acceptances were recorded); 'updated' — a version marked as a
* significant change came out after the one they accepted. false when nothing is needed.
*/
async function noticePromptPending(user, db = prisma) {
if (user.noticeVersionAccepted == null) return 'first';
const required = await requiredVersion(db);
if (required == null) return false;
return (user.noticeVersionAccepted ?? -1) < required;
return user.noticeVersionAccepted < required ? 'updated' : false;
}
/**
@@ -447,6 +505,11 @@ async function publish({ sections, changeSummary, requiresAcceptance, publishedB
module.exports = {
PLACEHOLDERS,
BUILT_IN_UPDATES,
BUILT_IN_REVISION,
builtInUpdates,
markBuiltInReviewed,
revisionLess,
defaultSections,
cleanSections,
noticeContext,