Thomas Aquinas indicates:
Objection 5. Further, religious are bound to obey their prelates. Now a prelate sometimes commands either all in general, or someone in particular, to tell him if they know of anything that requires correction. Therefore it would seem that they are bound to tell them this, even before any secret admonition. Therefore the precept does not require secret admonition before public denunciation.Latin Text:
Reply to Objection 5. A prelate is not to be obeyed contrary to a Divine precept, according to Acts 5:29: "We ought to obey God rather then men." Therefore when a prelate commands anyone to tell him anything that he knows to need correction, the command rightly understood supports the safeguarding of the order of fraternal correction, whether the command be addressed to all in general, or to some particular individual. If, on the other hand, a prelate were to issue a command in express opposition to this order instituted by Our Lord, both would sin, the one commanding, and the one obeying him, as disobeying Our Lord's command. Consequently he ought not to be obeyed, because a prelate is not the judge of secret things, but God alone is, wherefore he has no power to command anything in respect of hidden matters, except in so far as they are made known through certain signs, as by ill-repute or suspicion; in which cases a prelate can command just as a judge, whether secular or ecclesiastical, can bind a man under oath to tell the truth.
Praeterea, religiosi tenentur suis praelatis obedire. Sed quandoque praelati praecipiunt, vel communiter omnibus vel alicui specialiter, ut si quid scit corrigendum, ei dicatur. Ergo videtur quod teneantur ei dicere etiam ante secretam admonitionem. Non ergo est de necessitate praecepti ut secreta admonitio praecedat publicam denuntiationem.Citation: Thomas Aquinas, Summa Theologica, Second Part of the Section Part, Question 33, Article 7, Objection/Answer 5 (Latin text)
Ad quintum dicendum quod praelato non est obediendum contra praeceptum divinum, secundum illud Act. V, obedire oportet Deo magis quam hominibus. Et ideo quando praelatus praecipit ut sibi dicatur quod quis sciverit corrigendum, intelligendum est praeceptum sane, salvo ordine correctionis fraternae, sive praeceptum fiat communiter ad omnes, sive ad aliquem specialiter. Sed si praelatus expresse praeciperet contra hunc ordinem a domino constitutum, et ipse peccaret praecipiens et ei obediens, quasi contra praeceptum domini agens, unde non esset ei obediendum. Quia praelatus non est iudex occultorum, sed solus Deus, unde non habet potestatem praecipiendi aliquid super occultis nisi inquantum per aliqua indicia manifestantur, puta per infamiam vel aliquas suspiciones; in quibus casibus potest praelatus praecipere eodem modo sicut et iudex saecularis vel ecclesiasticus potest exigere iuramentum de veritate dicenda.
Notice that Thomas discusses the obedience of a religious person to their prelate. Thomas is distinguishing here between a person in their secular role - in which they owe obedience to princes - and their religious role - in which they owe obedience to prelates. Thomas indicates that the obedience to the prelate is to be subordinate to their obedience to God. While Thomas does not develop this, employing such subordinate authority requires the religious person to interpret the Word of God and to judge whether obedience to the prelate conflicts with obedience to God.
Thomas provides a similar example in the case of human laws:
But one may not be subject to a power in two ways. One may not be subject to a power in one way because one is absolutely free from subjection to the power. And so those belonging to one political community or kingdom are not subject to the laws of the ruler of another political community or kingdom, since such persons are not subject to that ruler's dominion. One may not be subject to a power in a second way insofar as one is ruled by a higher law. For example, a person subject to a proconsul ought to be ruled by the proconsul's commands but not regarding matters from which the emperor exempted the person. For regarding the latter, a person directed by a higher command is not bound by the command of an inferior power. And so those absolutely subject to the law may not be bound by the law regarding matters about which they are ruled by a higher law.
Treatise on Law (in Summa Theologica), On the Power of Human Laws (ST Q 96), Fifth Article, Answer (Richard J. Regan, translator)
And Thomas seems to draw a close parallel between secular government and church government:
Sometimes the inferior power emanates in its totality from the superior, in which case the entire potence of the former is founded upon the presence of the latter, so that obedience is due to the higher at all times and without exceptions. Such is the superiority of the Emperor's power over that of the the Proconsul [quoted from St. Augustine]; such that of the Pope over all spiritual powers in the in the Church, since the ecclesiastical hierarchies are ordained and disposed by him, and his power is in some manner the foundation of the Church as it appears from Matthew 16. Hence we are required in all these things to obey him rather than the bishop or archbishop and to him the monk owes obedience in preference to his abbot. But two powers may be such that both arise from a third and supreme authority, and their relative rank then depends upon the will of this uppermost power. When this is the case, either one of the two subordinate authorities controls the other only in those matters in which its superiority has been recognized by the uppermost power. Of such nature is the authority exercised by rulers, by bishops, archbishops, etc., over their subjects, for all of them have received it from the Pope and with it the conditions and limitations of its use.
II Sent. 44, explanation of the text (as provided in "The Political Ideas of St. Thomas Aquinas," p. xxxv, Dino Bigongiari, ed.)