Shaykh Saalih Al-Fawzaan was asked:

Question:

May Allah be good to you, O companion of Virtue. This question is via the internet. He says:  We are Muslims from America. Is it allowed to assist in building a masjid knowing that the administrators are not upright? And there will be free mixing in this masjid due to what we know of them [i.e. the administrators].

Answer:

“If you are able to prevent the free-mixing and prevent evils in this masjid or you stipulate that [they leave it off] and they are committed to leaving it off, then assist them.  As for if you are not able to prevent them nor will they accept it, then do not assist them. For that is assisting in sin and transgression”.

[Reference]

Translated by

Faisal bin Abdul Qaadir bin Hassan
Abu Sulaymaan