Org UI Improvements (#8436)

* feat(team_endpoints.py): support returning teams filtered by organization_id

allows user to just get teams they belong to, within the org

Enables org admin to see filtered list of teams on UI

* fix(teams.tsx): simple filter for team on ui - just filter team based on selected org id

* feat(ui/organizations): show 'default org' in switcher, filter teams based on selected org

* feat(user_dashboard.tsx): update team in switcher when org changes

* feat(schema.prisma): add new 'organization_id' value to key table

allow org admin to directly issue keys to a user within their org

* fix(view_key_table.tsx): fix regression where admin couldn't see keys

caused by bad console log statement

* fix(team_endpoints.py): handle default org value in /team/list

* fix(key_management_endpoints.py): allow proxy admin to create keys for team they're not in

* fix(team_endpoints.py): fix team endpoint to handle org id not being passed in

* build(config.yml): investigate what pkg is installing posthog in ci/cd

* ci(config.yml): uninstall posthog

prevent it from being added in ci/cd

* ci: auto-install ci
This commit is contained in:
Krish Dholakia 2025-02-10 19:13:32 -08:00 committed by GitHub
parent e26d7df91b
commit 13a3e8630e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 195 additions and 127 deletions

View file

@ -227,7 +227,7 @@ async def list_organization(
# if proxy admin - get all orgs
if user_api_key_dict.user_role == LitellmUserRoles.PROXY_ADMIN:
response = await prisma_client.db.litellm_organizationtable.find_many(
include={"members": True}
include={"members": True, "teams": True}
)
# if internal user - get orgs they are a member of
else:
@ -242,7 +242,7 @@ async def list_organization(
"in": [membership.organization_id for membership in org_memberships]
}
},
include={"members": True},
include={"members": True, "teams": True},
)
response = org_objects