def get_max_memberships_for_project(project):
    """Return tha maximun of membersh for a concrete project.

    :param project: A project object.

    :return: a number or null.
    """
    if project.owner is None:
        return None

    if project.is_private:
        return project.owner.max_memberships_private_projects
    return project.owner.max_memberships_public_projects