forked from phoenix/litellm-mirror
(fix) ui allow users to make ui chat requests
This commit is contained in:
parent
9f753ab194
commit
dc06205964
1 changed files with 14 additions and 0 deletions
|
@ -1465,6 +1465,20 @@ def _is_user_proxy_admin(user_id_information=None):
|
||||||
and _user.get("user_role") == "proxy_admin"
|
and _user.get("user_role") == "proxy_admin"
|
||||||
):
|
):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
# if user_id_information contains litellm-proxy-budget
|
||||||
|
# get first user_id that is not litellm-proxy-budget
|
||||||
|
for user in user_id_information:
|
||||||
|
if user.get("user_id") != "litellm-proxy-budget":
|
||||||
|
_user = user
|
||||||
|
break
|
||||||
|
|
||||||
|
if (
|
||||||
|
_user.get("user_role", None) is not None
|
||||||
|
and _user.get("user_role") == "proxy_admin"
|
||||||
|
):
|
||||||
|
return True
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue