diff options
author | Frederick Muriuki Muriithi | 2024-06-17 13:58:13 -0500 |
---|---|---|
committer | Alexander_Kabui | 2024-08-28 15:02:45 +0300 |
commit | 7ed51c24678d2b880081f81ad4439e7ebcb0d19d (patch) | |
tree | 4f80b68f7f2fff17443d068721d79e6793cc7299 /gn2/wqflask/oauth2 | |
parent | bb83fdde2cff7abd8571350966fa78545b1831ef (diff) | |
download | genenetwork2-7ed51c24678d2b880081f81ad4439e7ebcb0d19d.tar.gz |
Use privilege objects rather than IDS.
Diffstat (limited to 'gn2/wqflask/oauth2')
-rw-r--r-- | gn2/wqflask/oauth2/ui.py | 3 |
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 } |