mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 11:14:04 +00:00
ui - show all teams on ui
This commit is contained in:
parent
cd3b2a21c1
commit
50bbd188fb
1 changed files with 12 additions and 5 deletions
|
@ -5911,11 +5911,18 @@ async def user_info(
|
||||||
user_id=user_api_key_dict.user_id
|
user_id=user_api_key_dict.user_id
|
||||||
)
|
)
|
||||||
# *NEW* get all teams in user 'teams' field
|
# *NEW* get all teams in user 'teams' field
|
||||||
teams_2 = await prisma_client.get_data(
|
if getattr(caller_user_info, "user_role", None) == "proxy_admin":
|
||||||
team_id_list=caller_user_info.teams,
|
teams_2 = await prisma_client.get_data(
|
||||||
table_name="team",
|
table_name="team",
|
||||||
query_type="find_all",
|
query_type="find_all",
|
||||||
)
|
team_id_list=None,
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
teams_2 = await prisma_client.get_data(
|
||||||
|
team_id_list=caller_user_info.teams,
|
||||||
|
table_name="team",
|
||||||
|
query_type="find_all",
|
||||||
|
)
|
||||||
|
|
||||||
if teams_2 is not None and isinstance(teams_2, list):
|
if teams_2 is not None and isinstance(teams_2, list):
|
||||||
for team in teams_2:
|
for team in teams_2:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue