I can also see this both ways. Ideally, mum should be able to bf - let's not forget, though, that most babies in the US and quite a few in the U.K. will need to be fed an alternative milk so that mum can work at some point in a week. These babies survive just fine and some of the hyperbole about not breastfeeding at this age is unhelpful.
It also sounds as if mum has been purposely weaponising bf against dad. You don't know if the judge would have ordered this, or even whether it would have got to a judge, if the mother had been reasonable about what level of access dad could expect to have past the initial newborn stage and towards weaning.
It does feel a bit heavy handed, but there are clearly some on here who try to use bf to deny contact and then use the lack of consistent contact as a baby as a way of preventing contact going forward. Then get upset when dad is "deadbeat"