Best Case scenario: You are in a top university and working with a very successful advisor. (which is no brainer)
Case1: Not good university, good advisor
Case2: Good university, average advisor
From what I understand, advisor > university ( I am in a similar situation )
When you apply for postdocs, they will read your papers, and read the recommendation from that well networked advisor. Other applicants graduated from top universities, so what? Your coursework during Ph.D. doesn't matter anyways. Your sole responsiblity during Ph.D. is doing significant research. So if you can do better research than others, then it will be you who gets the position.
University during undergraduate is important, because only your department judges you of your success. Outsiders doesn't know whether all content during all courses were covered, are whether you really deserved that A. So they trust the good universities. But during Ph.D., your work is public. Anyone can read your work and judge your success. And your research will be main factor they take into consideration.
Edit: I heard that if you apply to a university that doesn't have any member doing research in your field, they won't be able to understand the significance of your work very much, so they will look at the name of your university.