def METHOD_NAME(
    name: str, request: pyramid.request.Request, is_intranet_: bool
) -> list[Union[str, int, float, bool, list[Any], dict[str, Any]]]:
    """Get all the functionality for the current user."""
    result: list[Union[str, int, float, bool, list[Any], dict[str, Any]]] = []
    errors: set[str] = set()
    if request.user is not None:
        result = _get_db_functionality(
            name, _user_to_struct(request.user), _get_functionalities_type(request), request, errors
        )
        if not result:
            result = _get_db_functionality(
                name,
                _get_role(request.get_organization_role("registered")),
                _get_functionalities_type(request),
                request,
                errors,
            )
    if not result and is_intranet_:
        result = _get_db_functionality(
            name,
            _get_role(request.get_organization_role("intranet")),
            _get_functionalities_type(request),
            request,
            errors,
        )
    if not result:
        result = _get_db_functionality(
            name,
            _get_role(request.get_organization_role("anonymous")),
            _get_functionalities_type(request),
            request,
            errors,
        )
    if errors != set():
        LOG.error("\n".join(errors))
    return result