
    h                     J    d dl mZmZ d dlmZ deeef   defdZdedefdZy)	    )DictUnion)LitellmUserRolesui_access_modereturnc                 .    t        | t              r| dk(  S y)z#Checks ui access mode is admin_only
admin_onlyF)
isinstancestr)r   s    o/var/www/Befach/backend/env/lib/python3.12/site-packages/litellm/proxy/management_endpoints/sso_helper_utils.pycheck_is_admin_only_accessr      s    .#&--    	user_rolec                 z    | t         j                  j                  k7  r| t         j                  j                  k7  ryy)z
    Check if the user has admin access to the UI.

    Returns:
        bool: True if user is 'proxy_admin' or 'proxy_admin_view_only', False otherwise.
    FT)r   PROXY_ADMINvaluePROXY_ADMIN_VIEW_ONLY)r   s    r   has_admin_ui_accessr      s4     	%11777)??EEEr   N)	typingr   r   litellm.proxy._typesr   r   boolr   r    r   r   <module>r      s:     1uS$Y/? D 3 4 r   