(a) Nothing in this part shall be construed to prohibit a religious organization or any organization operating solely for religious, charitable, educational or social welfare purposes from restricting membership or facilities to persons of the same religious faith, where necessary to promote the religious principles under which it was established and is currently maintained.
(b) This exemption applies only to organizations whose primary purpose is to serve members of a particular religion.