aboutsummaryrefslogtreecommitdiff
path: root/gn2/wqflask/oauth2
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-06-17 13:58:13 -0500
committerAlexander_Kabui2024-08-28 15:02:45 +0300
commit7ed51c24678d2b880081f81ad4439e7ebcb0d19d (patch)
tree4f80b68f7f2fff17443d068721d79e6793cc7299 /gn2/wqflask/oauth2
parentbb83fdde2cff7abd8571350966fa78545b1831ef (diff)
downloadgenenetwork2-7ed51c24678d2b880081f81ad4439e7ebcb0d19d.tar.gz
Use privilege objects rather than IDS.
Diffstat (limited to 'gn2/wqflask/oauth2')
-rw-r--r--gn2/wqflask/oauth2/ui.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/gn2/wqflask/oauth2/ui.py b/gn2/wqflask/oauth2/ui.py
index e31d87d9..90d65e0b 100644
--- a/gn2/wqflask/oauth2/ui.py
+++ b/gn2/wqflask/oauth2/ui.py
@@ -9,8 +9,7 @@ def render_ui(templatepath: str, **kwargs):
"""Handle repetitive UI rendering stuff."""
roles = kwargs.get("roles", tuple()) # Get roles
user_privileges = tuple(
- privilege["privilege_id"] for role in roles
- for privilege in role["privileges"])
+ privilege for role in roles for privilege in role["privileges"])
kwargs = {
**kwargs, "roles": roles, "user_privileges": user_privileges
}