aboutsummaryrefslogtreecommitdiff
path: root/gn2/wqflask
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-06-17 13:56:29 -0500
committerAlexander_Kabui2024-08-28 15:02:45 +0300
commitbb83fdde2cff7abd8571350966fa78545b1831ef (patch)
tree577b852a887dff966c0111433f2144fa719d273e /gn2/wqflask
parentc1efb9f57be588137ae3093d3c4aa7badff63b5f (diff)
downloadgenenetwork2-bb83fdde2cff7abd8571350966fa78545b1831ef.tar.gz
Delete request to obsoleted endpoint.
Diffstat (limited to 'gn2/wqflask')
-rw-r--r--gn2/wqflask/oauth2/ui.py7
1 files changed, 1 insertions, 6 deletions
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"])