From e795cdef989151fafbd8d13ae6bcd9404b565ca9 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Mon, 23 Dec 2024 22:03:33 +0100 Subject: [PATCH] fix typo --- frontend.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend.py b/frontend.py index 0a54d09..9589f24 100644 --- a/frontend.py +++ b/frontend.py @@ -244,7 +244,8 @@ def oauth2_callback(provider): session["oauth2_provider"] = provider session["oauth2_userinfo"] = userinfo_json - user_is_admin = SSO_CONFIG[provider]["functions"]["is_admin"](userinfo) + userid = SSO_CONFIG[provider]["functions"]["userid"](userinfo_json) + user_is_admin = SSO_CONFIG[provider]["functions"]["is_admin"](userinfo_json) REDIS.set(f"admin:{userid}", "1" if user_is_admin else "0") if "redirect_after_login" in session: