Profile accounts: invites, any-Google sign-in, claiming People, visibility, Discord

Migration 076 adds a member role below viewer (the site and its own
profile, never the admin: /api/admin now needs viewer), invites, person
claims, a Discord link on accounts and people.hide_* switches. Public reads
of people go through v_people_public, which nulls hidden fields, and the
views that read people are rebuilt over it.

Admins invite an email from Data -> Profile accounts (link shown once,
emailed on request). The invitee sets a password or signs in with any
Google account under that email, asks to claim their People record, and
once approved edits it and chooses what shows at /account.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aidan Dona 2026-10-16 18:14:30 -05:00
parent 0cc2a3f721
commit e4c7e165d1
34 changed files with 2483 additions and 74 deletions

View file

@ -6,12 +6,16 @@ off until the service has an OAuth client ID and secret.
## Who gets in
Two kinds of account can sign in with Google:
Three kinds of account can sign in with Google:
- **Group accounts**, when access groups are set up (below): anyone in
one of the site's Workspace groups. Their account is made at their
first sign-in, and their role follows the group.
- **Accounts made with admin-cli**, as before.
- **Profile accounts** (members, `docs/profile-accounts.md`), invited
from Data → Profile accounts. These are the one case outside the
Workspace: any Google account under the invited email, from the
site's `/sign-in` page or the invite's welcome page.
Created with
`admin-cli.js add <email>` (the password it asks for stays as a way in
@ -23,7 +27,8 @@ changes. `admin-cli.js list` shows which accounts are linked.
Refused, with a message on the login page: no admin account for that
email (and in no access group), an email already linked to a different Google account, a
disabled account, any account outside the Workspace domain (checked by
Google's `hd` claim, not just the email), an unverified email.
Google's `hd` claim, not just the email) unless it's a profile account's,
an unverified email.
Code: `server/src/googleAuth.js` (the Google side),
`server/src/routes/auth.js` (matching and linking accounts) and