Hilchos Lashon Hara chapter 7, section 13
Sometimes a beis din (Jewish court) is given permission because of a special need of the time. For example, someone comes to them crying out about something that was stolen from him. He has clear signs that a certain person stole the object, and the beis din also sees the clear signs themselves, or witnesses testified to them about the clear signs. Then the beis din may hit him so that he admits.
But an individual, or even a beis din, as long as the clear signs have not been proven to them, is not given permission for this.