forked from phoenix/litellm-mirror
test(test_key_generate_prisma.py): fix test to only let admin delete a key
This commit is contained in:
parent
2addd66393
commit
d1644db8ce
2 changed files with 15 additions and 1 deletions
|
@ -3776,6 +3776,9 @@ async def delete_key_fn(
|
|||
|
||||
## only allow user to delete keys they own
|
||||
user_id = user_api_key_dict.user_id
|
||||
verbose_proxy_logger.debug(
|
||||
f"user_api_key_dict.user_role: {user_api_key_dict.user_role}"
|
||||
)
|
||||
if (
|
||||
user_api_key_dict.user_role is not None
|
||||
and user_api_key_dict.user_role == "proxy_admin"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue