§1. An agreement or compromise cannot be made validly concerning matters which pertain to the public good and other matters about which the parties cannot make disposition freely.
§2. For temporal ecclesiastical goods, the formalities established by law for the alienation of ecclesiastical goods are to be observed whenever the matter demands it.
Source: Code of Canon Law (Vatican.va)