mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
test_is_ui_route_allowed
This commit is contained in:
parent
cdb94ffe16
commit
574f07d782
3 changed files with 50 additions and 21 deletions
|
@ -122,6 +122,11 @@ def _is_ui_route_allowed(
|
|||
):
|
||||
# Do something if the current route starts with any of the allowed routes
|
||||
return True
|
||||
elif any(
|
||||
RouteChecks._route_matches_pattern(route=route, pattern=allowed_route)
|
||||
for allowed_route in allowed_routes
|
||||
):
|
||||
return True
|
||||
else:
|
||||
if user_obj is not None and _is_user_proxy_admin(user_obj=user_obj):
|
||||
return True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue