def _get_rw_check_for_user(request, code):
    (check, rw) = _get_check_for_user(request, code)
    if (not rw):
        raise PermissionDenied
    return check
def _get_rw_check_for_user(request, code):
    (check, rw) = _get_check_for_user(request, code)
    if (not rw):
        raise PermissionDenied
    return check