Fix missing key mapping

This commit is contained in:
Willnow, Patrick
2024-10-03 20:55:32 +02:00
parent 9a691c0387
commit dc92178641
3 changed files with 19 additions and 14 deletions

View File

@@ -2249,7 +2249,7 @@ async def oauth_callback(provider: str, request: Request, response: Response):
role = user.role
if Users.get_num_users() == 1:
role = "admin"
elif webui_app.state.config.ENABLE_OAUTH_ROLE_MAPPING:
elif webui_app.state.config.ENABLE_OAUTH_ROLE_MAPPING.value:
oauth_roles = user_data.get(webui_app.state.config.OAUTH_ROLE_CLAIM)
if oauth_roles:
for allowed_role in ["pending", "user", "admin"]: