All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His Slave and Messenger.
If a Muslim deems certain forbidden acts lawful, this takes him out of the fold of Islam. These are the prohibitions that all Muslim scholars unanimously deemed forbidden and their impermissibility is well-known and agreed-upon among all Muslims with no room for potential misinterpretation or confusion. Scholars refer to such kind of prohibitions as indisputably established rulings of Islam, which are beyond reasonable doubts. For example, the obligation of Hijab (i.e. covering the woman's entire body except for the face and hands) and the prohibition of practicing homosexuality are clear-cut matters, unanimously and collectively agreed upon by Muslim scholars.
For more benefit, please refer to Fatwa 97262.
Scholars underlined that a religious ruling is not to be considered indisputably established beyond reasonable doubts except if it is well known to laymen and scholars alike. Verily, this differs from one place to the other and from one time to the other. For instance, what is a famous clear-cut matter among people in a given time or place may not be the same in another time or place. Therefore, one should not hasten to label a Muslim as a Kaafir (disbeliever) except after pieces of evidence are examined and all potential doubts are eliminated, especially for Muslims in non-Muslim communities nowadays. There is a possibility that such a person based his act on some sort of misinterpretation.
Ibn Qudaamah wrote, "Whoever permits what is unanimously and indisputably prohibited and ruled as sinful by jurists of Islam, such as the eating of pork or committing adultery and other similar well-known agreed-upon prohibitions, has certainly become a disbeliever. Moreover, whoever flagrantly commits sinful acts like killing those protected under the Islamic Sharee'ah and usurps their properties without claiming a religious exemption or a Sharee'ah-acceptable justification; he is, certainly, considered a disbeliever. If the person who committed such sinful acts claims a religious justification as in the case of the Kharijites, then we have mentioned that the majority of Muslim jurists argue that even the Kharijites, who used to shed blood of the believers and usurp their properties, may not be labeled as disbelievers although they committed their sinful acts while mistakenly believing that the act of shedding blood of the believers and usurping their properties is lawful, and believing it to be a good deed drawing them closer to Allaah. Likewise, Muslim jurists did not consider Ibn Muljam (the assassin of the Caliph ‘Ali (ibn Abi Taalib) ) a disbeliever even though he killed the best of all people at that time, because he killed him while believing that such an act would draw him closer to Allaah. Likewise, they did not label whoever praised him for doing it, or wished that he would do the same, as a disbeliever; like ‘Imraan ibn Hittaan who composed a poem in praise of his act." [Al-Mughni]
For further information, please refer to Fataawa 8106 and 87963.
Allaah Knows best.