Then when he says, When you are, he shows the manner of judging, and touches on three things: first, the assembling of the congregation when he says: When you are assembled. For serious offenses should be punished according to the considered agreement of many persons; hence in old times judges sat on the gates where the people were gathered together: "You shall appoint judges in all your gates" (Dt 16:18); "In the company of the upright, in the congregation" (Ps 111:1); "Where two or three are gathered in my name, there am I in the midst of them" (Matt 18:20). Secondly, he indicates his assent... when he says: and my spirit is present, i.e., with my will and authority. Thirdly, he presents the authority of the principal lord, namely, Jesus Christ, saying: with the power of the Lord Jesus, the power which gives strength and validity to the judgment of the Church: "Whatever you bind on earth shall be bound also in heaven" (Matt 18:18).
Source: Commentary on 1 Corinthians