mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-23 20:25:56 +00:00
d4d12f3289
The privileged-session gate (ensureAdminSession) and the settings capabilities snapshot only accepted a session whose username equals the configured local admin identity. SSO users are keyed by their provider-scoped principal (sso:oidc:...), which can never match, so an SSO session was locked out of every settings-scoped route no matter what roles it held. That made group role mappings (group=admin) appear broken (#1535) and surfaced as 'Unable to load SSO providers' when an SSO user opened the SSO settings panel (#1533). A session user now passes the gate when their effective RBAC permissions include the admin action on all resources, which is the shape the built-in Administrator role assigns through group role mappings. On an instance with no local admin identity configured at all (the v5 OIDC-only pattern), SSO sessions pass as before the rewrite, since they are the only administrators the instance has. Org-scoped tenant sessions keep their own management rules. Refs #1533, #1535