mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 19:24:27 +00:00
fix allow PROXY_ADMIN_VIEW_ONLY to create an account
This commit is contained in:
parent
358d4eec88
commit
524cfd458a
2 changed files with 40 additions and 0 deletions
|
@ -2658,6 +2658,17 @@ def _is_user_proxy_admin(user_id_information: Optional[list]):
|
|||
return False
|
||||
|
||||
|
||||
def _get_user_role(user_id_information: Optional[list]):
|
||||
if user_id_information is None:
|
||||
return None
|
||||
|
||||
if len(user_id_information) == 0 or user_id_information[0] is None:
|
||||
return None
|
||||
|
||||
_user = user_id_information[0]
|
||||
return _user.get("user_role")
|
||||
|
||||
|
||||
def encrypt_value(value: str, master_key: str):
|
||||
import hashlib
|
||||
import nacl.secret
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue