From afd94d70a6080ff422d8c3fc1aa96e2876a3d8f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Bedna=C5=99=C3=ADk?= <jan.bednarik@gmail.com> Date: Mon, 24 May 2021 14:42:44 +0200 Subject: [PATCH] Pirati auth tweaks for lowercase usernames --- helios_auth/auth_systems/pirati.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/helios_auth/auth_systems/pirati.py b/helios_auth/auth_systems/pirati.py index 43d2307..d0ce9dc 100644 --- a/helios_auth/auth_systems/pirati.py +++ b/helios_auth/auth_systems/pirati.py @@ -43,8 +43,8 @@ def get_user_info_after_auth(request): data = response.json() return { "type": "pirati", - "user_id": data["preferred_username"], - "name": data["name"], + "user_id": data["preferred_username"].lower(), + "name": data["preferred_username"].lower(), "info": {"email": data["email"]}, "token": {}, } @@ -125,8 +125,8 @@ def list_category_members(category_id): users.append( { "type": "pirati", - "id": member["username"], - "name": member["username"], + "id": member["username"].lower(), + "name": member["username"].lower(), "info": {"email": member["email"]}, "token": {}, } -- GitLab