Accounts agree to the terms and privacy policy, and it is recorded (#277)
- github
- github/openchronology/timeline-app
- commit
- main
- github/athanclark
Registering with a password needs an unticked "I agree" box, and so does a new social account's email step, before it can sign in. The form sends the version shown (the policies' effective date, POLICY_VERSION in server/policies.mjs), and the server refuses a missing or older one. The version and time are kept with the pending registration and the account (oc_users.terms_version, terms_accepted_at). Accounts that have not agreed to the version in force, such as those made before it, see a panel under the header asking them to (POST /api/auth/terms). Until they agree, their browser and desktop sessions may read, export, sign out, report, ask for a review and manage or delete the account and its timelines; other changes get 403 with `terms`. API keys made before keep working. The analytics browser test also checks that declining after allowing stops Google's script. Test accounts made with SQL agree through oc_policy_version(), which a unit test keeps equal to POLICY_VERSION and the policies' effective date. Closes #277 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_011fFY8eruEi1xAkkMBni13B https://github.com/openchronology/timeline-app/commit/04d9ea119fd7437a2ea88af57b40a03f0f70c9c3
Related
Open Accounts agree to the terms and privacy policy, and it is recorded (#277) in the timeline