All perfect praise be to Allah the Lord of the Worlds. May His peace and blessings be upon Prophet Mohammad and upon all his family and companions.
Roof of building is an easement for all residents since its being a joint property gives them the right to use it for placing their water tanks, satellite dishes and the like. Therefore, each resident has the right to use it in a manner that doesn`t prevent others from benefitting from it. This has been stipulated by Real Estate Law/2015. However, the Building Code/2018 permitted construction on the roof provided that all owners approve of that and in a manner that doesn`t prevent others from making use of its shared services.
The jurisprudential root in this regard is that shared rights are established by ownership of estate. Thus, whoever owns a flat in that estate enjoys the right to shared services and none may ban him/her from that. However, if an owner abdicates his/her right in these services, then there is nothing wrong with that. It is stated in "Asna al-Matalib Shareh Rawd at-Talib, V.2:P.225": "It is permissible for an owner to lend the roof of his building or house to someone to build on it and it is also permissible for him to lease it. This is similar to other objects that can be sold and leased. If the owner sold someone the right of constructing on roof by saying: "I sell you the right to construction on my roof for a specific price, then the buyer becomes entitled to that. On the contrary, if the owner sold the roof under the condition that the buyer may not build on it, or he didn`t mention this, then the buyer may benefit from this roof in any permissible manner, staying on it for example, but he may not construct on it. This is what Al-Subkhi said based on the view of Al-Ma`wardi."
Nevertheless, this is provided that laws and regulations governing the sale of joint roof are abided by. The evidence is that Allah, the Almighty says (What means) : "O ye who believe! Obey God, and obey the Apostle, and those charged with authority among you. If ye differ in anything among yourselves, refer it to God and His Apostle, if ye do believe in God and the Last Day: That is best, and most suitable for final determination." {An-Nisaa`, 59}. Part of obeying Allah is adhering to the laws and regulations made by the state for the common good. The resolution issued by the International Islamic Fiqh Academy during its eighteenth session stated, "The right to constructing on the roof is inalienable and the person may sell this right or gift it in line with the provisions governing that."
In conclusion, it is permissible to construct on a joint roof provided that laws and regulations pertaining to this matter are abided by. And Allah the almighty knows best.