From 5e381caf757556a927c24f3085d3dc14e3be3a0b Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Thu, 17 Oct 2024 11:04:26 -0700 Subject: [PATCH] Revert "fix(ui_sso.py): fix faulty admin check" This reverts commit 22d95c99b56cbea0dde5ca29b36439ff58daeef6. --- litellm/proxy/_new_secret_config.yaml | 7 +++++-- litellm/proxy/management_endpoints/ui_sso.py | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/litellm/proxy/_new_secret_config.yaml b/litellm/proxy/_new_secret_config.yaml index 5021d3e07..90c9fc3d9 100644 --- a/litellm/proxy/_new_secret_config.yaml +++ b/litellm/proxy/_new_secret_config.yaml @@ -5,5 +5,8 @@ model_list: api_key: os.environ/OPENAI_API_KEY -general_settings: - ui_access_mode: admin_only +assistant_settings: + custom_llm_provider: azure + litellm_params: + api_key: os.environ/AZURE_API_KEY + api_base: os.environ/AZURE_API_BASE diff --git a/litellm/proxy/management_endpoints/ui_sso.py b/litellm/proxy/management_endpoints/ui_sso.py index 7f2cc1c21..d2b0e551a 100644 --- a/litellm/proxy/management_endpoints/ui_sso.py +++ b/litellm/proxy/management_endpoints/ui_sso.py @@ -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 - and user_role != LitellmUserRoles.PROXY_ADMIN_VIEW_ONLY.value + or user_role != LitellmUserRoles.PROXY_ADMIN_VIEW_ONLY.value ): verbose_proxy_logger.debug("EXCEPTION RAISED") raise HTTPException(