Pope Paul VI
Sacerdotalis Caelibatus §15
Sacerdotalis Caelibatus: On the Celibacy of the Priest
15 The gift of the priestly vocation dedicated to the divine worship and to the religious and pastor al service of the People of God , is undoubtedly distinct from that which leads a person to choose celibacy as a state of consecrated life. (8) But the priestly vocation, although inspired by God, does not become definitive or operative without having been tested and accepted by those in the Church who hold power and bear responsibility for the ministry serving the ecclesial community. It is, therefore, the task of those who hold authority in the Church to determine, in accordance with the varying conditions of time and place, who in actual practice are to be considered suitable candidates for the religious and pastoral service of the Church, and what should be required of them.
Source: Sacerdotalis Caelibatus (Vatican.va)