def _get_rw_channel_for_user(request, code):
    (channel, rw) = _get_channel_for_user(request, code)
    if (not rw):
        raise PermissionDenied
    return channel
def _get_rw_channel_for_user(request, code):
    (channel, rw) = _get_channel_for_user(request, code)
    if (not rw):
        raise PermissionDenied
    return channel