chef server core changes.

updated based on comments
this diff looks like crap, but I did was wrap the logic based on the private-chef cond