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

@ -168,6 +168,8 @@ def _team_key_generation_check(
user_api_key_dict: UserAPIKeyAuth,
data: GenerateKeyRequest,
):
if user_api_key_dict.user_role == LitellmUserRoles.PROXY_ADMIN.value:
return True
if (
litellm.key_generation_settings is not None
and "team_key_generation" in litellm.key_generation_settings