mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
feat(user_info_view.tsx): be able to click in and see all teams user is part of
makes it easy to see which teams a user belongs to
This commit is contained in:
parent
44264ab6d6
commit
ea07c83503
4 changed files with 337 additions and 2 deletions
|
@ -751,8 +751,10 @@ export const userInfoCall = async (
|
|||
userRole: String,
|
||||
viewAll: Boolean = false,
|
||||
page: number | null,
|
||||
page_size: number | null
|
||||
page_size: number | null,
|
||||
lookup_user_id: boolean = false
|
||||
) => {
|
||||
console.log(`userInfoCall: ${userID}, ${userRole}, ${viewAll}, ${page}, ${page_size}, ${lookup_user_id}`)
|
||||
try {
|
||||
let url: string;
|
||||
|
||||
|
@ -766,7 +768,7 @@ export const userInfoCall = async (
|
|||
} else {
|
||||
// Use /user/info endpoint for individual user info
|
||||
url = proxyBaseUrl ? `${proxyBaseUrl}/user/info` : `/user/info`;
|
||||
if (userRole === "Admin" || userRole === "Admin Viewer") {
|
||||
if ((userRole === "Admin" || userRole === "Admin Viewer") && !lookup_user_id) {
|
||||
// do nothing
|
||||
} else if (userID) {
|
||||
url += `?user_id=${userID}`;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue