feat(webapp): the server's owner, offers, About, the campaigns' and audit log's names, and Admin's overview (lane 9 A) #855
Loading…
Reference in a new issue
No description provided.
Delete branch "build/lane9-a-owner-overview"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Lane 9 (#735), server PR A: the owner's D140–D142 (A3, A4 and A5) and D148 (A11). No pages; those are 4a–4d.
The server's owner (D68, D140, D141)
Migration
f1a3c5e7b9d2(onc4e6a8b0d2f1) adds:users.is_server_owner, with a partial unique index so there's at most one owner;server_ownership_offerstable (one open offer at a time);server_ownership_offerandcampaign_handed_on.Backfill (A3): the owner is whoever finished setup, if they're still an admin. Failing that, it's the earliest admin, and failing that, nobody.
Guards:
/me. This comes on top of #837's last-admin guard.Offers (A4):
GET /admin/server-owner.AttentionItemneeds a server-level kind first.Vanished owner: CLI
python -m app.cli set_owner --email|--oidc-sub/--oidc-issuer, documented indocs/OPERATIONS.md.UserResponse.is_server_owneris added.Also
PUT /admin/settings/member-search-scope.GET|PUT /admin/settings/about.delivery_failing_since,owner_last_seen_atanduses_own_ai;GET /admin/campaigns/{id}/members;actorandcampaignname, and bycategory;actor_name(with "The system" for events no user triggered),campaign_nameandtarget_label, resolved with two queries per page.GET /admin/overview(A5, D142): a single request with cheap reads only, including the skipped setup steps with their section keys. The bot status is cached for 60 s, with a 2 s timeout.Tests
test_server_owner.pyandtest_server_owner_migration.py, the latter covering the backfill cases, the CHECKs, and up, down and up.Merge notes
c4e6. Whichever merges second gets re-chained.Depends(get_db)uses here are converted toscope="function"at merge.🤖 Generated with Claude Code