def _get_rw_project_for_user(request, project_code):
    ' Check access, return (project, rw) tuple. '
    (project, rw) = _get_project_for_user(request, project_code)
    if (not rw):
        raise PermissionDenied
    return project
Check access, return (project, rw) tuple.
def _get_rw_project_for_user(request, project_code):
    '  '
    (project, rw) = _get_project_for_user(request, project_code)
    if (not rw):
        raise PermissionDenied
    return project