aboutsummaryrefslogtreecommitdiff
path: root/gn2/wqflask
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-06-17 13:58:13 -0500
committerFrederick Muriuki Muriithi2024-06-17 13:58:13 -0500
commitcb8154f79a755e2d6f38de969acc10e5240ca888 (patch)
tree3d98ae46682c4e43a4616201834f4810fd1abe85 /gn2/wqflask
parentea4696e1c476a0d706d6b31372281feedd9bc376 (diff)
downloadgenenetwork2-cb8154f79a755e2d6f38de969acc10e5240ca888.tar.gz
Use privilege objects rather than IDS.
Diffstat (limited to 'gn2/wqflask')
-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
}