Archived
- Retention policies (Admin -> Privacy -> Retention) applied by a nightly
`retention` job: inactive accounts anonymised after 5 years with a
30-day warning (on by default; never staff roles or people with an
upcoming registration), form answers, login history, payer details in
payment notifications, audit/access logs
- User.lastLoginAt (set on login, backfilled) and inactivityWarnedAt
- Breach register (SecurityBreach) with drafts for the people affected
and the Information Regulator
- Readiness checklist with a score
- Children's/medical flag in the access log; {retention} placeholder in
the privacy notice
- Unit tests (retention.test.js), e2e (privacy-retention.spec.ts); docs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012mt6TCv85T9VKRq3cV7rXq
155 lines
9.0 KiB
TypeScript
155 lines
9.0 KiB
TypeScript
import React from "react";
|
|
import { Megaphone, Download, PencilLine, Trash2, MailX, Inbox, Clock, ShieldCheck, MessageCircle, ScrollText, Send, ListChecks, Building2, Eye, Gauge, Timer, AlertTriangle } from "lucide-react";
|
|
import { GuideItem } from "@/components/shared/GuideItem";
|
|
import type { HelpContent } from "./types";
|
|
|
|
/** Help content for /dashboard/user/privacy (the person's own privacy centre). */
|
|
export const userPrivacyHelpContent: HelpContent = {
|
|
title: "Privacy",
|
|
subtitle: "What we send you, your data, and your rights under POPIA.",
|
|
tabs: [
|
|
{
|
|
key: "messages",
|
|
label: "Messages",
|
|
icon: Megaphone,
|
|
content: (
|
|
<div className="space-y-4">
|
|
<GuideItem icon={Megaphone} title="News & announcements" tone="brand">
|
|
Occasional messages about upcoming events. You only get them if you said yes — by email, WhatsApp or both. Untick a box to stop them.
|
|
</GuideItem>
|
|
<GuideItem icon={ShieldCheck} title="Messages about your events" tone="green">
|
|
Tickets, receipts, reminders and changes to events you registered for are always sent, by the channel you chose in Profile & Security.
|
|
</GuideItem>
|
|
<GuideItem icon={MailX} title="Unsubscribe" tone="amber">
|
|
Every news email has an unsubscribe link, and you can reply STOP to a news message on WhatsApp. The history under the boxes shows every choice you made and when.
|
|
</GuideItem>
|
|
</div>
|
|
),
|
|
},
|
|
{
|
|
key: "data",
|
|
label: "Your data",
|
|
icon: Download,
|
|
content: (
|
|
<div className="space-y-4">
|
|
<GuideItem icon={Download} title="Download my data" tone="brand">
|
|
The PDF is easy to read; the JSON file is the complete copy. Both include your registrations, the people you registered, form answers, payments, tickets and check-ins.
|
|
</GuideItem>
|
|
<GuideItem icon={PencilLine} title="Correct my data" tone="green">
|
|
Change your name, email and phone in Profile & Security. For anything else, send a correction request — we answer by email within 30 days.
|
|
</GuideItem>
|
|
<GuideItem icon={Trash2} title="Delete my account" tone="rose">
|
|
Your account is closed straight away. Your personal information is deleted once the request is processed (within 30 days) — after any upcoming event you registered for. Payment amounts and dates are kept without your name, because the law requires it.
|
|
</GuideItem>
|
|
</div>
|
|
),
|
|
},
|
|
],
|
|
};
|
|
|
|
/** Help content for /dashboard/admin/privacy. */
|
|
export const adminPrivacyHelpContent: HelpContent = {
|
|
title: "Privacy (POPIA)",
|
|
subtitle: "Your privacy notice, operators, retention, breaches and the consent and access records.",
|
|
tabs: [
|
|
{
|
|
key: "readiness",
|
|
label: "Readiness & retention",
|
|
icon: Gauge,
|
|
content: (
|
|
<div className="space-y-4">
|
|
<GuideItem icon={Gauge} title="Readiness" tone="brand">
|
|
A checklist with a score: Information Officer set, notice published, operators described, retention reviewed and running, requests answered on time, breaches reported, unsubscribe and WhatsApp STOP working, backups, two-factor login. Each open item links to where you fix it.
|
|
</GuideItem>
|
|
<GuideItem icon={Timer} title="Retention" tone="amber">
|
|
How long each kind of personal information is kept. Every night at 03:30 the retention job deletes or anonymises what's older: inactive accounts (after a warning 30 days before — logging in keeps the account), event form answers, login history, payer details from payment notifications, and old audit/access records. The privacy notice's retention section follows these settings ({"{retention}"}). Review and save them, even if you keep the defaults.
|
|
</GuideItem>
|
|
<GuideItem icon={AlertTriangle} title="Breaches" tone="rose">
|
|
Record any security compromise. POPIA requires telling the Information Regulator and the people affected as soon as reasonably possible; each entry has a draft for both, and you record when you told them. Readiness flags any not reported to the Regulator within 3 days.
|
|
</GuideItem>
|
|
</div>
|
|
),
|
|
},
|
|
{
|
|
key: "notice",
|
|
label: "Privacy notice",
|
|
icon: ScrollText,
|
|
content: (
|
|
<div className="space-y-4">
|
|
<GuideItem icon={ScrollText} title="Editing" tone="brand">
|
|
The notice starts from the built-in text. Change any section, add or remove sections, and save a draft — nothing is public until you publish. Placeholders like {"{org}"}, {"{ioName}"} and {"{operators}"} are filled in from Site settings and the operator register, so they stay up to date.
|
|
</GuideItem>
|
|
<GuideItem icon={Send} title="Publishing" tone="green">
|
|
Each publish is a numbered version with its date, and earlier versions stay readable on the privacy page. Tick "Significant change" and say what changed when people should accept it again — they're asked once, after they next log in. Leave it unticked for small fixes.
|
|
</GuideItem>
|
|
<GuideItem icon={ShieldCheck} title="Not legal advice" tone="amber">
|
|
The tools help you comply; your Information Officer should check the wording.
|
|
</GuideItem>
|
|
</div>
|
|
),
|
|
},
|
|
{
|
|
key: "records",
|
|
label: "Operators & logs",
|
|
icon: ListChecks,
|
|
content: (
|
|
<div className="space-y-4">
|
|
<GuideItem icon={Building2} title="Operators" tone="brand">
|
|
The services that process personal information for you: payment providers, WhatsApp and email delivery, hosting. Check the details of each — especially your email and hosting provider. Ones marked "in use" are listed in the privacy notice.
|
|
</GuideItem>
|
|
<GuideItem icon={ListChecks} title="Consent log" tone="green">
|
|
Proof of consent: every news opt-in and opt-out (and how — sign-up, unsubscribe link, STOP reply…), every privacy notice acceptance, and every parental consent answer.
|
|
</GuideItem>
|
|
<GuideItem icon={Eye} title="Access log" tone="violet">
|
|
Who downloaded, emailed or opened personal information in bulk — reports, attendance registers, certificates, group lists, form answers, consent and medical lists, backups — and every "view as" session.
|
|
</GuideItem>
|
|
</div>
|
|
),
|
|
},
|
|
],
|
|
};
|
|
|
|
/** Help content for /dashboard/admin/data-requests. */
|
|
export const adminDataRequestsHelpContent: HelpContent = {
|
|
title: "Data requests",
|
|
subtitle: "POPIA requests from people about their personal information.",
|
|
tabs: [
|
|
{
|
|
key: "how",
|
|
label: "How it works",
|
|
icon: Inbox,
|
|
content: (
|
|
<div className="space-y-4">
|
|
<GuideItem icon={Inbox} title="Where requests come from" tone="brand">
|
|
People send correction and deletion requests from their Privacy page (or by ticking "also delete my data" when closing their account). The Information Officer (Site settings → Legal) and all admins are emailed for each one.
|
|
</GuideItem>
|
|
<GuideItem icon={Clock} title="30 days" tone="amber">
|
|
POPIA asks for an answer within 30 days. Requests due within a week or overdue are emailed to admins every morning, and overdue ones are outlined in red.
|
|
</GuideItem>
|
|
<GuideItem icon={Download} title="Access requests" tone="green">
|
|
People download their own data from their Privacy page, so those aren't listed here. If someone asks by email or phone, point them to that page. (Downloading is blocked while viewing as someone else, so an admin can't take a person's full record that way.)
|
|
</GuideItem>
|
|
</div>
|
|
),
|
|
},
|
|
{
|
|
key: "handle",
|
|
label: "Handling a request",
|
|
icon: Trash2,
|
|
content: (
|
|
<div className="space-y-4">
|
|
<GuideItem icon={PencilLine} title="Corrections" tone="brand">
|
|
Make the change (e.g. on the registration or attendee), then click Mark as done and say what you changed — it's emailed to them.
|
|
</GuideItem>
|
|
<GuideItem icon={Trash2} title="Deletions" tone="rose">
|
|
The account is already closed. If they have a registration for an upcoming event, cancel it (refund if needed) or wait until the event is over. Then Delete personal data: their name, contact details, attendees, form answers and the payer details kept by Yoco/PayFast notifications are removed. Payments, registrations and check-ins stay as "Deleted User" for the books and reports. It can't be undone and is logged in the audit log.
|
|
</GuideItem>
|
|
<GuideItem icon={MessageCircle} title="Reject or cancel" tone="amber">
|
|
Give a reason; it's emailed to them. Tick "They withdrew it" if they changed their mind. Rejecting or cancelling a deletion opens their account again.
|
|
</GuideItem>
|
|
</div>
|
|
),
|
|
},
|
|
],
|
|
};
|