aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-05-10 13:19:01 +0300
committerFrederick Muriuki Muriithi2023-05-10 13:19:01 +0300
commit5df9f0400f5457071a6e717ba68d72454f6f07f5 (patch)
tree17ab37b72c6fc649677edad56d2f22114d3a334d /wqflask
parent2babf1077277d6654203f642994866007aff3509 (diff)
downloadgenenetwork2-5df9f0400f5457071a6e717ba68d72454f6f07f5.tar.gz
auth: bug-fix: Call `logged_in` function
The `logged_in` symbol was changed from a plain variable into a function, so we need to call it to get its actual value.
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/oauth2/ui.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/wqflask/wqflask/oauth2/ui.py b/wqflask/wqflask/oauth2/ui.py
index c5ea1468..abf30f4e 100644
--- a/wqflask/wqflask/oauth2/ui.py
+++ b/wqflask/wqflask/oauth2/ui.py
@@ -8,7 +8,7 @@ def render_ui(templatepath: str, **kwargs):
"""Handle repetitive UI rendering stuff."""
logged_in = lambda: ("oauth2_token" in session and bool(session["oauth2_token"]))
roles = kwargs.get("roles", tuple()) # Get roles if already provided
- if logged_in and not bool(roles): # If not, try fetching them
+ if logged_in() and not bool(roles): # If not, try fetching them
roles_results = oauth2_get("oauth2/user/roles").either(
lambda err: {"roles_error": process_error(err)},
lambda roles: {"roles": roles})