The Messenger of Allah ﷺ said to Ali, "Ali, it is not permitted for anyone to remain in this mosque while in a state of major ritual impurity except me and you."Ali bin al-Mundhir said, I asked Dirar bin Surad, "What is the meaning of this hadith?"He replied, "It is not permitted for anyone to pass through it while in a state of major ritual impurity except me and you."
حدثنا علي بن المنذر حدثنا محمد بن فضيل عن سالم بن أبي حفصة عن عطية
قال رسول الله ﷺ لعلي يا علي لا يحل لأحد أن يجنب في هذا المسجد غيري وغيرك قال علي بن المنذر قلت لضرار بن صرد ما معنى هذا الحديث قال لا يحل لأحد يستطرقه جنبا غيري وغيرك
No references are available.
Its isnad is daif. Bayhaqi narrated it in 7/66 through the same hadith of Ali bin Mundhir. Atiya Awfi is daif and a mudallis.