Skip to content

Commit d6e5f0a

Browse files
committed
fix: handle OIDC groups as string
1 parent f945bc9 commit d6e5f0a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

backend/application/access_control/services/oidc_authentication.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,14 @@ def _get_groups_from_token(self, payload: dict) -> list:
179179
return []
180180

181181
groups = payload.get(os.environ["OIDC_GROUPS"])
182-
if not groups or not isinstance(groups, list):
182+
183+
if not groups:
184+
return []
185+
186+
if isinstance(groups, str):
187+
groups = [groups]
188+
189+
if not isinstance(groups, list):
183190
return []
184191

185192
return sorted(groups)

0 commit comments

Comments
 (0)