fix: type error when role claim is null

This commit is contained in:
Tarow
2025-10-19 11:42:04 +02:00
committed by Niklas Tasler
parent e2418d7471
commit cb2015fc4d

View File

@@ -332,7 +332,7 @@ class OpenIDHandler:
role = Role.VIEWER
if OIDC_CLAIM_ROLES and OIDC_CLAIM_ROLES in userinfo:
roles = userinfo[OIDC_CLAIM_ROLES]
roles = userinfo[OIDC_CLAIM_ROLES] or []
if OIDC_ROLE_ADMIN and OIDC_ROLE_ADMIN in roles:
role = Role.ADMIN
elif OIDC_ROLE_EDITOR and OIDC_ROLE_EDITOR in roles: