Federal judge rules against California’s restrictions