Repository navigation
Conversation
…pping Adds a viewer role that opens every console page and read API an operator role can, and changes nothing: it is added to every read rule that names a role and to no mutation rule or fallback, which a test checks against every route in the app. Roles now have one definition, admin/roles.py, used by the middleware, the SSO allowlist and the generated admin-roles page. Setting the SSO subject of a console account now needs owner or admin. Before, security_admin could map its own SSO identity to an owner's account and sign in as that owner; agent mappings still need security_admin. A refused htmx request now shows a notice saying why, instead of the click doing nothing, and read-only accounts are labelled in the sidebar.
jogunjobi
added a commit
that referenced
this pull request
Oct 15, 2026
…pping (#59) Adds a viewer role that opens every console page and read API an operator role can, and changes nothing: it is added to every read rule that names a role and to no mutation rule or fallback, which a test checks against every route in the app. Roles now have one definition, admin/roles.py, used by the middleware, the SSO allowlist and the generated admin-roles page. Setting the SSO subject of a console account now needs owner or admin. Before, security_admin could map its own SSO identity to an owner's account and sign in as that owner; agent mappings still need security_admin. A refused htmx request now shows a notice saying why, instead of the click doing nothing, and read-only accounts are labelled in the sidebar.
Contributor
Author
|
Landed on main as a4d038a (squashed; change identical to the PR diff). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First of two PRs for console user management (adding console users with types: Administrator, Read-write, Read-only, Custom). This one adds the role and the safety fix the second PR builds on.
/api/admin-auth/oidc/admins/*) now needs owner/admin. Previously security_admin could map its own SSO identity to an owner's account and sign in through SSO as that owner. Agent mappings still need security_admin.admin/roles.py(middleware, SSO allowlist, generated docs, and the user types the next PR uses).Tests: new viewer and SSO-mapping RBAC tests, role-helper and template tests; mutations
viewer-added-to-mutation-fallbackandoidc-admin-mapping-reopened-to-security-adminare both caught. Local: lint, type, 3394 unit/dashboard/integration tests, docs-check pass. Docs: admin-access page, regenerated admin-roles and admin-api references, CHANGELOG.