16 Now, with regard to entering societies, extreme care should be taken not to be ensnared by error. And We wish to be understood as referring in a special manner to the working classes, who assuredly have the right to unite in associations for the promotion of their interests; a right acknowledged by the Church and unopposed by nature. But it is very important to take heed with whom they are to associate, lest whilst seeking aid for the improvement of their condition they may be imperilling far weightier interests. The most effectual precaution against this peril is to determine with themselves at no time or in any matter to be parties to the violation of justice. Any society, therefore, which is ruled by and servilely obeys persons who are not steadfast for the right and friendly to religion is capable of being extremely prejudicial to the interests as well of individuals as of the community; beneficial it cannot be. Let this conclusion, therefore, remain firm-to shun not only those associations which have been openly condemned by the judgment of the Church, but those also which, in the opinion of intelligent men, and especially of the bishops, are regarded as suspicious and dangerous.
Source: Longinqua (Vatican.va)