Constrained public goods in networks