From ea4696e1c476a0d706d6b31372281feedd9bc376 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 17 Jun 2024 13:56:29 -0500 Subject: Delete request to obsoleted endpoint. --- gn2/wqflask/oauth2/ui.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'gn2') diff --git a/gn2/wqflask/oauth2/ui.py b/gn2/wqflask/oauth2/ui.py index cf2e9af7..e31d87d9 100644 --- a/gn2/wqflask/oauth2/ui.py +++ b/gn2/wqflask/oauth2/ui.py @@ -7,12 +7,7 @@ from .request_utils import process_error def render_ui(templatepath: str, **kwargs): """Handle repetitive UI rendering stuff.""" - roles = kwargs.get("roles", tuple()) # Get roles if already provided - if user_logged_in() and not bool(roles): # If not, try fetching them - roles_results = oauth2_get("auth/system/roles").either( - lambda err: {"roles_error": process_error(err)}, - lambda roles: {"roles": roles}) - kwargs = {**kwargs, **roles_results} + roles = kwargs.get("roles", tuple()) # Get roles user_privileges = tuple( privilege["privilege_id"] for role in roles for privilege in role["privileges"]) -- cgit v1.2.3