diff --git a/litellm/proxy/management_endpoints/internal_user_endpoints.py b/litellm/proxy/management_endpoints/internal_user_endpoints.py index 0f5bc46cc6..0d87519511 100644 --- a/litellm/proxy/management_endpoints/internal_user_endpoints.py +++ b/litellm/proxy/management_endpoints/internal_user_endpoints.py @@ -885,6 +885,11 @@ async def delete_user( where={"user_id": {"in": data.user_ids}} ) + ## DELETE ASSOCIATED ORGANIZATION MEMBERSHIPS + await prisma_client.db.litellm_organizationmembership.delete_many( + where={"user_id": {"in": data.user_ids}} + ) + ## DELETE USERS deleted_users = await prisma_client.db.litellm_usertable.delete_many( where={"user_id": {"in": data.user_ids}} diff --git a/ui/litellm-dashboard/src/components/admins.tsx b/ui/litellm-dashboard/src/components/admins.tsx index 32fd0f2865..d10c9bda42 100644 --- a/ui/litellm-dashboard/src/components/admins.tsx +++ b/ui/litellm-dashboard/src/components/admins.tsx @@ -496,116 +496,7 @@ const AdminPanel: React.FC = ({ return (
Admin Access - - {showSSOBanner && ( - - Requires SSO Setup - - )} -
- Proxy Admin: Can create keys, teams, users, add models, etc.{" "} -
- Proxy Admin Viewer: Can just view spend. They cannot create keys, - teams or grant users access to new models.{" "} -
- - - - - - - Member Name - Role - - - - - {admins - ? admins.map((member: any, index: number) => ( - - - {member["user_email"] - ? member["user_email"] - : member["user_id"] - ? member["user_id"] - : null} - - - {" "} - {possibleUIRoles?.[member?.user_role]?.ui_label || - "-"} - - - setIsUpdateModalModalVisible(true)} - /> - - {modifyMemberForm( - handleMemberUpdate, - member["user_role"], - member["user_id"] - )} - - - - )) - : null} - -
-
- - -
- - - {addMemberForm(handleAdminCreate)} - - - - - {addMemberForm(handleMemberCreate)} - -
- -
+ Go to 'Internal Users' page to add other admins. ✨ Security Settings diff --git a/ui/litellm-dashboard/src/components/common_components/user_search_modal.tsx b/ui/litellm-dashboard/src/components/common_components/user_search_modal.tsx index e31c038482..e415c04f2b 100644 --- a/ui/litellm-dashboard/src/components/common_components/user_search_modal.tsx +++ b/ui/litellm-dashboard/src/components/common_components/user_search_modal.tsx @@ -163,7 +163,7 @@ const UserSearchModal: React.FC = ({
-
diff --git a/ui/litellm-dashboard/src/components/team/edit_membership.tsx b/ui/litellm-dashboard/src/components/team/edit_membership.tsx index 2e22f2a5d6..3d1696916e 100644 --- a/ui/litellm-dashboard/src/components/team/edit_membership.tsx +++ b/ui/litellm-dashboard/src/components/team/edit_membership.tsx @@ -129,7 +129,7 @@ const TeamMemberModal: React.FC = ({ Cancel {mode === 'add' ? 'Add Member' : 'Save Changes'}