inventorymgr/accesscontrol.py
def can_set_permissions(
    user_obj: Union[api.User, api.NewUser, api.UpdatedUser]
) -> bool:
    """
    Check if current session's user can set permissions in user_dict.

    A user can set permissions if they are a subset of their own permissions.
    """
    user = get_session_user()
    return all(getattr(user, k) or not getattr(user_obj, k) for k in PERMISSIONS)

    Check if current session's user can set permissions in user_dict.

    A user can set permissions if they are a subset of their own permissions.
    
Check if current session's user can set permissions in user_dict.
A user can set permissions if they are a subset of their own permissions.
Check if current session ' s user can set permissions in user_dict . A user can set permissions if they are a subset of their own permissions .
def can_set_permissions(
    user_obj: Union[api.User, api.NewUser, api.UpdatedUser]
) -> bool:
    user = get_session_user()
    return all(getattr(user, k) or not getattr(user_obj, k) for k in PERMISSIONS)
def can_set_permissions ( user_obj : Union [ api . User , api . NewUser , api . UpdatedUser ] ) -> bool : user = get_session_user ( ) return all ( getattr ( user , k ) or not getattr ( user_obj , k ) for k in PERMISSIONS )
Check if current session's user can set permissions in user_dict.
Check if current session ' s user can set permissions in user_dict .
"""
    Check if current session's user can set permissions in user_dict.

    A user can set permissions if they are a subset of their own permissions.
    """
user_obj
Union[api.User, api.NewUser, api.UpdatedUser]