I can’t comment about legal or constitutional rights, but from a Catholic perspective restrictions can be justified if conducive to the common good in the given circumstances (see CCC 2109). The common good must include considerations of man’s temporal and spiritual goods, so the bar is pretty high when it comes to closing churches–but a temporary closure and other restrictions during a pandemic, provided the sacraments are still available for those in need (especially those in danger of death) and the Church is otherwise free to carry on her preaching (even if only in print or electronically), then it could be justified. Our prelates seem in agreement with the state that it is in fact justified these days.