From cb8154f79a755e2d6f38de969acc10e5240ca888 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 17 Jun 2024 13:58:13 -0500 Subject: Use privilege objects rather than IDS. --- gn2/wqflask/oauth2/ui.py | 3 +-- 1 file changed, 1 insertion(+), 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 } -- cgit v1.2.3