Phase 10, part 2: the first owner, from a one-time setup link

A new server prints a link to create its owner (supermarket setup-link
makes another); until it's used, every page says the setup isn't
finished. One-time links (schema 33) are kept as hashes and used up in
one statement; resets and invitations will use them too. The server
edition opens Postgres.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-25 08:53:14 -07:00
co-authored by Claude Opus 5.5
parent 96404a3580
commit 72455438c9
16 changed files with 553 additions and 10 deletions
+1 -1
View File
@@ -154,6 +154,7 @@ func TestAddCSRF(t *testing.T) {
func TestServerEditionNeedsSignIn(t *testing.T) {
s, h := newServerEdition(t)
owner := addUser(t, s, "owner@example.com", users.Owner, nil)
// Not signed in: pages lead to the sign-in page; what's public stays so.
rec := do(h, http.MethodGet, "/seo/check?site=0", nil, nil)
if rec.Code != http.StatusSeeOther || rec.Header().Get("Location") != "/signin?next=%2Fseo%2Fcheck%3Fsite%3D0" {
@@ -175,7 +176,6 @@ func TestServerEditionNeedsSignIn(t *testing.T) {
}
// Signed in.
owner := addUser(t, s, "owner@example.com", users.Owner, nil)
c := sessionFor(t, s, owner)
if rec := as(h, c, http.MethodGet, "/settings/profile", nil); rec.Code != http.StatusOK {
t.Errorf("signed in: %d", rec.Code)