Jabir bin 'Abdullah (Allah be pleased with them) said that the Messenger of Allah ﷺ decreed pre-emption in every joint ownership and not divided-the one-it may be a dwelling or a garden. It is not lawful for him (for the partner) to sell that until his partner gives his consent. He (the partner) is entitled to buy it when he desires and he can abandon it if he so likes. And if he (the one partner) sells it without getting the consent of the (other partner), he has the greatest right to it. (Using translation from Muslim 1608b)
قَضَى رَسُولُ اللهِ ﷺ بِالشُّفْعَةِ فِي كُلِّ شِرْكٍ لَمْ يُقْسَمْ رَبْعَةٍ أَوْ حَائِطٍ لَا يَحِلُّ لَهُ أَنْ يَبِيعَهُ حَتَّى يُؤْذِنَ شَرِيكَهُ فَإِنْ شَاءَ أَخَذَ وَإِنْ شَاءَ تَرَكَ فَإِنْ بَاعَ وَلَمْ يُؤْذِنْهُ فَهُوَ أَحَقُّ بِهِ 6255 وَعَنْ يُوسُفَ بْنِ سَعِيدٍ عَنْ حَجَّاجِ بْنِ مُحَمَّدٍ عَنِ ابْنِ جُرَيْجٍ بِهِ