--- id: multi-user/a-second-super-admin-was-storable-and-made title: "A second Super Admin was storable, and made the owner nondeterministic" theme: multi-user status: done created: 2026-08-11 date_source: stated order: 9 --- **A second Super Admin was storable, and made the owner nondeterministic.** Fixed 2026-08-11. `ck_users_owner_is_super_admin` pins user 1's role but a row-level CHECK cannot see other rows, and `updateUserRoleHandler` happily promoted anyone — while `getOwnerUser()` was `WHERE role='Super Admin' LIMIT 1` with no ORDER BY. Two holders would have made "who owns this server" a question the query plan answered, and that answer feeds the agent sidecar's identity, vault access and origin scoping. Both write paths now refuse the role, the list endpoint offers `assignableRoles` without it, and `getOwnerUser()` orders by id.