forked from phoenix/litellm-mirror
(fix) proxy - show value of allow_user_auth
This commit is contained in:
parent
626fea9a68
commit
c43b6e6f41
1 changed files with 3 additions and 1 deletions
|
@ -534,6 +534,7 @@ async def user_api_key_auth(
|
||||||
and (not is_master_key_valid)
|
and (not is_master_key_valid)
|
||||||
and (not general_settings.get("allow_user_auth", False))
|
and (not general_settings.get("allow_user_auth", False))
|
||||||
):
|
):
|
||||||
|
# enters this block when allow_user_auth is set to False
|
||||||
assert not general_settings.get("allow_user_auth", False)
|
assert not general_settings.get("allow_user_auth", False)
|
||||||
if route == "/key/info":
|
if route == "/key/info":
|
||||||
# check if user can access this route
|
# check if user can access this route
|
||||||
|
@ -560,8 +561,9 @@ async def user_api_key_auth(
|
||||||
# /model/info just shows models user has access to
|
# /model/info just shows models user has access to
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
|
allow_user_auth = general_settings.get("allow_user_auth", False)
|
||||||
raise Exception(
|
raise Exception(
|
||||||
f"only master key can be used to generate, delete, update or get info for new keys/users."
|
f"Only master key can be used to generate, delete, update or get info for new keys/users. Value of allow_user_auth={allow_user_auth}"
|
||||||
)
|
)
|
||||||
|
|
||||||
return UserAPIKeyAuth(api_key=api_key, **valid_token_dict)
|
return UserAPIKeyAuth(api_key=api_key, **valid_token_dict)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue