Instance admin: org-sys sees and manages every org on the instance #319
Notifications
Due Date
No due date set.
Depends on
Reference: sam/archie#319
Reference in new issue
Block a user
Goal
Owners of org-sys are instance admins: they see every org on the instance, can create an org with its first owner, and can edit instance policies, also when signed in through OIDC.
Context
instanceOwneris true only for the shared-token system principal (internal/webui/api_access_policies.go:117-121), so with OIDC on nobody can edit instance policies.ownerin org-sys (org.DefaultOrgID).Steps
Principal.InstanceAdmin()ininternal/domain/access(owner membership in DefaultOrgID). Use it ininstanceOwner.defaultworkspace and the owner membership in one State Store call.Out of scope
Acting inside another org's resources (tasks, workflows) as an instance admin. Org deletion. OIDC settings.
Stop when
instanceOwner).task checkpasses.feat(org): instance admins manage every org, close. Stop.Rules for this ticket
bd create(one line of why) and carry on. Do not fix it.task checkonce at the end. If it fails twice on the same problem, stop and write what failed in a bead comment (bd comments add <id> "...") instead of looping.Close reason
Backend
f966d07f, dashboard14320949.Imported from beads
archie-core-kgxw.6· GitHub #1275 · type feature · priority P1 · created 2026-10-05 · closed 2026-10-05sam wrote (originally 2026-10-05):
Backend done (commit feat(org): instance admins manage every org): Principal.InstanceAdmin (owner of org-sys, whichever org it acts in) drives instanceOwner; GET /api/orgs lists all to admins; other orgs' routes open for admins only (404 otherwise, also enforced in the State Store's orgFor); POST /api/orgs creates org + default workspace + owner in one transaction and seeds the shipped role policies; api.orgCreate added. Left: steps 4-5 (org switcher + screenshots) wait on kgxw.3's Org area, which is in progress elsewhere.
sam wrote (originally 2026-10-05):
Switcher and New org landed: instance admins pick any org on the Org area and create one with an owner; non-admins see their own org only. Access and Tokens act on the caller's own org server-side, so they are hidden while another org is viewed. Playwright at 1920x947 with a stubbed API checked admin, non-admin and create.