fix(ui_sso.py): fix faulty admin check

fix check to make sure admin can log into ui in 'admin_only' ui access mode

Fixes https://github.com/BerriAI/litellm/issues/6286
This commit is contained in:
Krrish Dholakia 2024-10-17 11:02:49 -07:00
parent f724f3131d
commit 22d95c99b5
2 changed files with 3 additions and 6 deletions

View file

@ -547,7 +547,7 @@ async def auth_callback(request: Request):
## CHECK IF ROLE ALLOWED TO USE PROXY ##
if ui_access_mode == "admin_only" and (
user_role != LitellmUserRoles.PROXY_ADMIN.value
or user_role != LitellmUserRoles.PROXY_ADMIN_VIEW_ONLY.value
and user_role != LitellmUserRoles.PROXY_ADMIN_VIEW_ONLY.value
):
verbose_proxy_logger.debug("EXCEPTION RAISED")
raise HTTPException(