Several of the companions of the Messenger of Allah ﷺ had doors that opened directly into the mosque. One day he said, "Close all these doors except the door of Ali."People began to talk about this, so the Messenger of Allah ﷺ stood up, praised Allah Almighty and glorified Him, then said, "To proceed, I ordered that these doors be closed except the door of Ali, and some among you have spoken about it. By Allah, I have not closed anything nor opened anything of my own accord, but I was commanded to do something and I followed it."
حدثنا محمد بن جعفر حدثنا عوف عن ميمون أبي عبد الله
كان لنفر من أصحاب رسول الله ﷺ أبواب شارعة في المسجد قال فقال يوما سدوا هذه الأبواب إلا باب علي قال فتكلم في ذلك الناس قال فقام رسول الله ﷺ فحمد الله تعالى وأثنى عليه ثم قال أما بعد فإني أمرت بسد هذه الأبواب إلا باب علي وقال فيه قائلكم وإني والله ما سددت شيئا ولا فتحته ولكني أمرت بشيء فاتبعته
No references are available.
Its chain of transmission is daif, because of Maymun Abu Abdullah Basri. The hadith was narrated by Tirmidhi, 5/641, no. 3732, who said, "Gharib." Hakim graded it sahih, 3/125, but Dhahabi disagreed with him because of Maymun. Haythami said, 9/144, "It contains Maymun Abu Abdullah, whom Ibn Hibban deemed reliable while a group of scholars deemed him daif, and the rest of its narrators are the narrators of the Sahih."