Archived
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:
@@ -9,11 +9,12 @@ import { errorMessage } from "@/lib/utils";
|
||||
import type { PublicNotice } from "@/components/shared/PrivacyNoticeSection";
|
||||
|
||||
/**
|
||||
* POPIA: a privacy notice version marked as a significant change has been published, and
|
||||
* this person accepted an older one. Asked once after login; it can't be waved away, but the
|
||||
* notice and the Privacy page (to delete the account instead) stay reachable.
|
||||
* POPIA: asked once after login when this person never accepted the privacy notice (an account
|
||||
* made for them, or from before acceptances were recorded) — reason "first" — or a version marked
|
||||
* as a significant change came out after the one they accepted ("updated"). It can't be waved
|
||||
* away, but the notice and the Privacy page (to delete the account instead) stay reachable.
|
||||
*/
|
||||
export function NoticePrompt({ onDone }: { onDone: () => void }) {
|
||||
export function NoticePrompt({ reason = "updated", onDone }: { reason?: "first" | "updated"; onDone: () => void }) {
|
||||
const { token } = useAuth();
|
||||
const [notice, setNotice] = useState<PublicNotice | null>(null);
|
||||
const [saving, setSaving] = useState(false);
|
||||
@@ -40,7 +41,7 @@ export function NoticePrompt({ onDone }: { onDone: () => void }) {
|
||||
};
|
||||
|
||||
// The newest version that needed accepting, for "what changed".
|
||||
const changes = notice.versions.find(v => v.requiresAcceptance)?.changeSummary || notice.changeSummary;
|
||||
const changes = reason === "updated" ? notice.versions.find(v => v.requiresAcceptance)?.changeSummary || notice.changeSummary : null;
|
||||
|
||||
return (
|
||||
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4" role="dialog" aria-modal="true" aria-labelledby="notice-prompt-title">
|
||||
@@ -49,7 +50,7 @@ export function NoticePrompt({ onDone }: { onDone: () => void }) {
|
||||
<div className="w-9 h-9 rounded-lg flex items-center justify-center bg-brand-50 text-brand-600 shrink-0">
|
||||
<ScrollText className="w-5 h-5" />
|
||||
</div>
|
||||
<h2 id="notice-prompt-title" className="text-lg font-semibold text-gray-900">We've updated our privacy notice</h2>
|
||||
<h2 id="notice-prompt-title" className="text-lg font-semibold text-gray-900">{reason === "first" ? "Our privacy notice" : <>We've updated our privacy notice</>}</h2>
|
||||
</div>
|
||||
{changes && (
|
||||
<div className="mb-3 p-3 rounded-lg bg-gray-50 border text-sm text-gray-700 whitespace-pre-line">
|
||||
@@ -57,6 +58,7 @@ export function NoticePrompt({ onDone }: { onDone: () => void }) {
|
||||
</div>
|
||||
)}
|
||||
<p className="text-sm text-gray-600 mb-5">
|
||||
{reason === "first" && <>It explains what we keep about you and why, and your rights. </>}
|
||||
Please read the <Link href="/legal/privacy" target="_blank" className="text-brand-600 hover:underline">privacy notice</Link> and
|
||||
accept it to carry on using your account. If you don't agree, you can{" "}
|
||||
<Link href="/dashboard/user/privacy" className="text-brand-600 hover:underline">delete your account</Link> instead.
|
||||
|
||||
Reference in New Issue
Block a user