Skip to content

feat(cms): account pages in the Payload admin (PX2) - #23

Merged
ruehowl merged 1 commit into
mainfrom
orun/PX-3-account-pages-v2
Oct 28, 2026
Merged

ruehowl merged 1 commit into
mainfrom
orun/PX-3-account-pages-v2

Conversation

@ruehowl

@ruehowl ruehowl commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

PX2 of the lumen-payload-console epic (task PX-3, milestone PX2). The old console's account pages move into the Payload admin, behind the Lumen sign-in from PX1. They're grouped under Account in the nav.

Page Path What it does
Profile /admin/account Display name; a change is also written to the users row
Security /admin/account/security Sign-in activity, paged
Organization /admin/organization The person's organization and role
Notifications /admin/organization/notifications Notification categories on or off

Each page reads and writes the signed-in Lumen account through api-edge with the session cookie's bearer. Forms post to same-origin routes (/lumen/profile, /lumen/notifications), then land back on their page with a status. No token reaches client code.

Also in this change

  • Session lookups:
    • Concurrent requests that use one token share a single api-edge lookup.
    • A session api-edge confirmed in the last 5 minutes survives api-edge being briefly unable to answer, until it expires.
  • Framing: the admin can't be framed by another origin (frame-ancestors 'self', X-Frame-Options: SAMEORIGIN).
  • identity-worker: security events are queried by the user's UUID, not the public usr_ id. The old code made the endpoint answer 503 for everyone. The same fix is now in orun-cloud as sourceplane/orun-cloud#2114.
  • api-edge: a bearer's own session, profile and security-events reads get an account rate family (60/min). Sign-in stays on auth (10/min), so the admin no longer spends the sign-in budget on page loads.
  • Docs: runbook, architecture, overview, operations guide, epic status.

Verification

  • PX1 is deployed and verified on stage (35/35 end-to-end checks) and on prod (read-only).
  • This branch's tree is identical to the tip that passed local end-to-end verification: 23/23 checks against the built Worker and stage's real api-edge, plus the cms, api-edge and identity-worker test suites, typecheck and lint.
  • After merge, I'll re-run the stage end-to-end checks against the deployed admin. They cover every doneWhen item in tasks/PX-3.TaskContract.yaml.

Orun-Task: PX-3



Generated by Claude Code

The account pages of the old console move into the Payload admin, as views
behind the Lumen sign-in: Profile (/admin/account), Security
(/admin/account/security), Organization (/admin/organization) and
Notifications (/admin/organization/notifications), linked from the admin nav.
Each reads and writes the signed-in Lumen account through api-edge with the
session cookie's bearer; a profile name change is also written to the
`users` row.

- forms post to same-origin routes (/lumen/profile, /lumen/notifications)
  and land back on their page with a status; no client-side token
- session lookups are shared per token, and a session api-edge confirmed in
  the last 5 minutes survives api-edge being unable to answer, until it
  expires
- the admin cannot be framed by another origin (frame-ancestors 'self')
- identity-worker: security events take the user's UUID, not the public
  usr_ id, which made the endpoint answer 503 for everyone
- api-edge: a bearer's own session, profile and security-events reads get
  an `account` rate family (60/min); sign-in stays on `auth` (10/min)
- docs: runbook, architecture, overview, operations guide; epic status

Orun-Task: PX-3

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013JuHbkZCjDrGgHdzCrCRqG
@ruehowl
ruehowl marked this pull request as ready for review October 28, 2026 20:45
@ruehowl
ruehowl merged commit 07c459b into main Oct 28, 2026
13 checks passed
ruehowl pushed a commit to sourceplane/multi-tenant-saas-2 that referenced this pull request Oct 28, 2026
…LX2)

The old console's account and billing pages move into the Payload admin, as
views behind the staff Lumen sign-in, for every staff role: Profile
(/admin/account), Security activity (/admin/account/security), Organization
(/admin/organization), Notifications (/admin/organization/notifications) and
Billing & plan (/admin/organization/billing), under an Account group in the
nav. Ported from sourceplane/lumen-payload#23 and #24 (PX2, PX3).

- each reads and writes the signed-in Lumen account through api-edge with
  the session cookie's bearer; forms post to same-origin /lumen/* routes and
  land back on their page with a status; no client-side token
- Upgrade starts the provider's checkout, which returns to the billing page,
  which reconciles with one same-origin form post; switch or cancel behind a
  confirm step; the customer portal for a paid subscription; where no
  provider is configured (stage) the page says so
- session lookups are shared per token, and a session api-edge confirmed in
  the last 5 minutes survives api-edge being unable to answer, until it
  expires; the admin cannot be framed by another origin
- identity-worker: security events take the user's UUID, not the public
  usr_ id, which made the endpoint answer 503 for everyone
- api-edge: a bearer's own session, profile and security-events reads get
  an `account` rate family (60/min); sign-in stays on `auth` (10/min)
- docs: runbook, architecture, overview, operations guide; epic status

Orun-Task: LX-3

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013JuHbkZCjDrGgHdzCrCRqG
ruehowl added a commit to sourceplane/multi-tenant-saas-2 that referenced this pull request Oct 28, 2026
…LX2) (#20)

The old console's account and billing pages move into the Payload admin, as
views behind the staff Lumen sign-in, for every staff role: Profile
(/admin/account), Security activity (/admin/account/security), Organization
(/admin/organization), Notifications (/admin/organization/notifications) and
Billing & plan (/admin/organization/billing), under an Account group in the
nav. Ported from sourceplane/lumen-payload#23 and #24 (PX2, PX3).

- each reads and writes the signed-in Lumen account through api-edge with
  the session cookie's bearer; forms post to same-origin /lumen/* routes and
  land back on their page with a status; no client-side token
- Upgrade starts the provider's checkout, which returns to the billing page,
  which reconciles with one same-origin form post; switch or cancel behind a
  confirm step; the customer portal for a paid subscription; where no
  provider is configured (stage) the page says so
- session lookups are shared per token, and a session api-edge confirmed in
  the last 5 minutes survives api-edge being unable to answer, until it
  expires; the admin cannot be framed by another origin
- identity-worker: security events take the user's UUID, not the public
  usr_ id, which made the endpoint answer 503 for everyone
- api-edge: a bearer's own session, profile and security-events reads get
  an `account` rate family (60/min); sign-in stays on `auth` (10/min)
- docs: runbook, architecture, overview, operations guide; epic status

Orun-Task: LX-3


Claude-Session: https://claude.ai/code/session_013JuHbkZCjDrGgHdzCrCRqG

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants