Matthew 18:15-18
15 Moreover if thy brother shall trespass against thee, go and tell him his fault between thee and him alone: if he shall hear thee, thou hast gained thy brother.
16 But if he will not hear thee, then take with thee one or two more, that in the mouth of two or three witnesses every word may be established.
17 And if he shall neglect to hear them, tell it unto the church: but if he neglect to hear the church, let him be unto thee as an heathen man and a publican.
18 Verily I say unto you, Whatsoever ye shall bind on earth shall be bound in heaven: and whatsoever ye shall loose on earth shall be loosed in heaven.
The Grace New Testament Commentary - Matthew 18:18
18:18 When the proper procedures are followed, the decision of the church is regarded as authoritative in heaven. Binding and loosing refer to the judicial authority that belongs to a body of believers in exercising church discipline. Literally, the Greek states, "whatever you bind (i.e., prohibit) on earth" shall have been "bound in heaven and whatever you loose (i.e., permit) on earth" shall have been "loosed in heaven" (cf. Matthew 16:19). Some teach that the person so disciplined is excluded not only from the assembly but also from eternal life. This, however, presses the meaning too far in light of passages such as John 10:28-29. A believer can and sometimes does become rebellious. Treating him like a "heathen" or a "tax collector" refers to recognizing an impenitent, immoral state, not whether he or she is regenerate.