The Messenger of Allah ﷺ said: Three things one is not allowed to do: supplicating Allah specifically for himself and ignoring others while leading people in prayer; if he did so, he deceived them; looking inside a house before taking permission: if he did so, it is as if he entered the house, saying prayer while one is feeling the call of nature until one eases oneself.
قَالَ رَسُولُ اللَّهِ ﷺ ثَلاَثٌ لاَ يَحِلُّ لأَحَدٍ أَنْ يَفْعَلَهُنَّ لاَ يَؤُمُّ رَجُلٌ قَوْمًا فَيَخُصُّ نَفْسَهُ بِالدُّعَاءِ دُونَهُمْ فَإِنْ فَعَلَ فَقَدْ خَانَهُمْ وَلاَ يَنْظُرُ فِي قَعْرِ بَيْتٍ قَبْلَ أَنْ يَسْتَأْذِنَ فَإِنْ فَعَلَ فَقَدْ دَخَلَ وَلاَ يُصَلِّي وَهُوَ حَقِنٌ حَتَّى يَتَخَفَّفَ