This website is under review. Do not rely on it for final rulings.
Machine translation
Question
I bought a paid course, and the one who explains it created a program, so I created the program with him. Is it permissible for me to publish the source code that I wrote with my own hands for everyone to see, noting that I will not publish what he wrote but only what I wrote, as I follow after him, and that my source code and his source code are exactly identical because I was learning from him, or should I abandon the matter entirely, noting that I help people with it?
Answer
All praise is due to Allah, and may peace and blessings be upon the Messenger of Allah, and upon his family and companions. To proceed:
The basic ruling is that it is permissible for you to do that, unless one of the conditions of attending the course is not to publish such material. So you must abide by the conditions and contracts you agreed to, due to His saying, Exalted is He: "O you who have believed, fulfill (your) contracts,"يَا أَيُّهَا الَّذِينَ آمَنُوا أَوْفُوا بِالْعُقُودِ{Al-Ma'idah: 1}.
And it is narrated from the Prophet, peace be upon him, that he said: "Muslims are bound by their conditions, except a condition that makes lawful what is unlawful or makes unlawful what is lawful". Narrated by al-Bukhari in suspended form, and narrated by al-Tirmidhi, who said: This is a hasan sahih hadith.
Malik narrated in al-Muwatta from al-Qasim ibn Muhammad: "I did not find the people except that they were upon their conditions regarding their wealth and what they were given."
And Allah knows best.
الحمد لله، والصلاة والسلام على رسول الله، وعلى آله وصحبه، أما بعد:
فالأصل أنه يجوز لك فعل ذلك إلا إذا كان من شروط حضور الدورة عدم نشر مثل ذلك؛ فعليك التزام ما وافقت عليه من الشروط والعقود؛ لقوله تعالى: يَا أَيُّهَا الَّذِينَ آمَنُوا أَوْفُوا بِالْعُقُودِ {المائدة: 1}.
وفي الحديث عن النبي -صلى الله عليه وسلم- أنه قال: المسلمون على شروطهم إلا شرطا حرم حلالا أو أحل حراما. أخرجه البخاري تعليقا، وأخرجه الترمذي، وقال: هذا حديث حسن صحيح.
وروى مالك في الموطأ عن القاسم بن محمد: ما أدركت الناس إلا وهم على شروطهم في أموالهم، وفيما أعطوا.
والله أعلم.
More fatwas from our library on the same topic