✨(backend) populate User.teams from a configurable OIDC claim#763
Open
maartendra wants to merge 1 commit into
Open
✨(backend) populate User.teams from a configurable OIDC claim#763maartendra wants to merge 1 commit into
maartendra wants to merge 1 commit into
Conversation
User.teams shipped as a hardcoded empty list, so deployers had to patch the model to wire team-based access to their identity provider's groups. Add an OIDC_TEAMS_CLAIM setting: when set, that claim is stored on the user (alongside OIDC_STORE_CLAIMS) and read by User.teams. Defaults to None, preserving the previous behaviour. Companion to the existing OIDC_STORE_CLAIMS mechanism.
|
kernicPanel
self-requested a review
July 8, 2026 05:42
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.



Purpose
User.teamswas a hardcodedreturn [], so every deployer who wants team-based access had to fork or monkeypatch the model to wire it to their identity provider's groups. This makes it config-driven, matching the existingOIDC_STORE_CLAIMSmechanism.What changes
OIDC_TEAMS_CLAIM(defaultNone, fully backward-compatible).get_extra_claimsstores that claim andUser.teamsreturnsself.claims[OIDC_TEAMS_CLAIM].Usage
With an IdP emitting a
groupsclaim,User.teamsreturns the user's groups, enablingItemAccess(team=…)team workspaces out of the box.Tests
User.teams: unset →[]; configured → the claim list; configured-but-absent/null →[].OIDC_STORE_CLAIMS, and surfaces viaUser.teams.Docs (
docs/env.md) and CHANGELOG updated.Closes #762.