def METHOD_NAME(user, perm, obj=None, cache="user"):
    """
    cache param determines how memberships are calculated trying to reuse the existing data
    in cache
    """
    project = _get_object_project(obj)
    if not project:
        return False
    return perm in get_user_project_permissions(user, project, cache=cache)