Why? For nostalgic reasons? X-ray now is a global setting (for all objects in the viewport). in 2.7 it wasn't really x-ray, it just gave you the possibility in Edit Mode to select something at the back of an object. (it took me about half an hour to try and find x-ray in 2.79...)
But to get this effect, you can simply put the X-Ray slider to 1 (in the Overlays dropdown):
I hope your friend is happy!
Actually, the grid axis lines don't pass through objects. The grid floor shows through, but not the axis. If you look at the screenshots below (or even take a closer look at your own screenshot) you'll see that the only difference between having x-ray on and x-ray off is the vertices showing through from the other side of the object.
Turning the grid floor off does, however, keep that from showing through.
Or have I misunderstood what you're asking?
@rontarrant I think you misunderstood the question. With the Wireframe set to 1 (like I said) the axis don't go through, but with the default 0.5 setting they do pass through the object. The screenshot that sshisou posted is from 2.78 and, if I understood correctly, that is how his friend wants it: not passing through, but then in 2.8.