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:
parent
0cc2a3f721
commit
e4c7e165d1
34 changed files with 2483 additions and 74 deletions
|
|
@ -129,7 +129,7 @@ people.get("/people", (c) => {
|
|||
p.bio,
|
||||
o.id AS primary_org_id,
|
||||
o.name AS primary_org_name
|
||||
FROM people p
|
||||
FROM v_people_public p
|
||||
LEFT JOIN organizations o ON o.id = p.primary_org_id AND o.is_published = 1
|
||||
WHERE p.id IN (${marks(ids.length)})
|
||||
AND p.is_published = 1`,
|
||||
|
|
@ -167,7 +167,7 @@ people.get("/directories/:tag", (c) => {
|
|||
o.id AS primary_org_id,
|
||||
o.name AS primary_org_name
|
||||
FROM person_tags t
|
||||
JOIN people p ON p.id = t.person_id AND p.is_published = 1 AND p.is_listed = 1
|
||||
JOIN v_people_public p ON p.id = t.person_id AND p.is_published = 1 AND p.is_listed = 1
|
||||
LEFT JOIN organizations o ON o.id = p.primary_org_id AND o.is_published = 1
|
||||
WHERE t.tag_id = ?
|
||||
ORDER BY COALESCE(p.sort_name, p.display_name)`,
|
||||
|
|
@ -221,7 +221,7 @@ people.get("/people/:id", (c) => {
|
|||
o.id AS primary_org_id,
|
||||
o.name AS primary_org_name,
|
||||
o.kind AS primary_org_kind
|
||||
FROM people p
|
||||
FROM v_people_public p
|
||||
LEFT JOIN organizations o ON o.id = p.primary_org_id AND o.is_published = 1
|
||||
WHERE p.id = ? AND p.is_published = 1`,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue