mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
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:
parent
f724f3131d
commit
22d95c99b5
2 changed files with 3 additions and 6 deletions
|
@ -5,8 +5,5 @@ model_list:
|
||||||
api_key: os.environ/OPENAI_API_KEY
|
api_key: os.environ/OPENAI_API_KEY
|
||||||
|
|
||||||
|
|
||||||
assistant_settings:
|
general_settings:
|
||||||
custom_llm_provider: azure
|
ui_access_mode: admin_only
|
||||||
litellm_params:
|
|
||||||
api_key: os.environ/AZURE_API_KEY
|
|
||||||
api_base: os.environ/AZURE_API_BASE
|
|
||||||
|
|
|
@ -547,7 +547,7 @@ async def auth_callback(request: Request):
|
||||||
## CHECK IF ROLE ALLOWED TO USE PROXY ##
|
## CHECK IF ROLE ALLOWED TO USE PROXY ##
|
||||||
if ui_access_mode == "admin_only" and (
|
if ui_access_mode == "admin_only" and (
|
||||||
user_role != LitellmUserRoles.PROXY_ADMIN.value
|
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")
|
verbose_proxy_logger.debug("EXCEPTION RAISED")
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue