def _review_request_is_accessible(request, review_request_id, diff_revision,
                                  *args, **kwargs):
    """Returns True if the user has access to the review request and diff.

    If the review request or the diff revision does not exist, we return False.
    """
    try:
        review_request = resources.review_request.get_object(
            request, review_request_id=review_request_id, *args, **kwargs)
    except __HOLE__:
        return False

    if not _diff_revision_exists(review_request, diff_revision):
        return False

    return review_request.is_accessible_by(request.user)
dataset/ETHPy150Open reviewboard/ReviewBot/extension/reviewbotext/resources.py/_review_request_is_accessible