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

@ -59,6 +59,10 @@ const QrCodes = lazyPage(() => import("./pages/QrCodes.tsx"))
const Privacy = lazyPage(() => import("./pages/Privacy.tsx"))
const Terms = lazyPage(() => import("./pages/Terms.tsx"))
const NotFound = lazyPage(() => import("./pages/NotFound.tsx"))
// Profile accounts (076): signing in, an invite's welcome, the profile.
const SignIn = lazyPage(() => import("./pages/SignIn.tsx"))
const AccountWelcome = lazyPage(() => import("./pages/AccountWelcome.tsx"))
const Account = lazyPage(() => import("./pages/Account.tsx"))
/*Entity Pages*/
const EventDetail = lazyPage(() => import("./pages/EventDetail.tsx"))
@ -82,12 +86,15 @@ const AdminMedia = lazyPage(() => import("./pages/admin/AdminMedia.tsx"))
const AdminClips = lazyPage(() => import("./pages/admin/AdminClips.tsx"))
const AdminVideoFrames = lazyPage(() => import("./pages/admin/AdminVideoFrames.tsx"))
const AdminNewsletter = lazyPage(() => import("./pages/admin/AdminNewsletter.tsx"))
const AdminProfiles = lazyPage(() => import("./pages/admin/AdminProfiles.tsx"))
const EntityList = lazyPage(() => import("./pages/admin/EntityList.tsx"))
const EntityEdit = lazyPage(() => import("./pages/admin/EntityEdit.tsx"))
export default function App() {
return (
<BrowserRouter>
{/* The whole app: the site shows a profile link and hidden pages by who's signed in. */}
<AuthProvider>
<Routes>
{/* Layout renders the nav once and swaps page content into <Outlet /> */}
<Route element={<Layout />}>
@ -114,6 +121,9 @@ export default function App() {
<Route path="give" element={<Giving />} />
<Route path="privacy" element={<Privacy />} />
<Route path="terms" element={<Terms />} />
<Route path="sign-in" element={<SignIn />} />
<Route path="account" element={<Account />} />
<Route path="account/welcome" element={<AccountWelcome />} />
<Route path="*" element={<NotFound />} />
</Route>
{/* A schedule as a slideshow for a screen: full screen, no Layout. */}
@ -127,11 +137,9 @@ export default function App() {
/>
<Route
element={
<AuthProvider>
<Suspense fallback={null}>
<Outlet />
</Suspense>
</AuthProvider>
<Suspense fallback={null}>
<Outlet />
</Suspense>
}
>
<Route path="/admin/login" element={<AdminLogin />} />
@ -152,6 +160,7 @@ export default function App() {
</Route>
<Route element={<RequireRole role="admin" />}>
<Route path="clips" element={<AdminClips />} />
<Route path="profiles" element={<AdminProfiles />} />
</Route>
<Route path=":entity" element={<EntityList />} />
<Route path=":entity/:id" element={<EntityEdit />} />
@ -159,6 +168,7 @@ export default function App() {
</Route>
</Route>
</Routes>
</AuthProvider>
</BrowserRouter>
)
}