סימן קנב סעיף ה
בַּיִת שֶׁפִּתְחוֹ פָּתוּחַ לִרְשׁוּת הָרַבִּים, אֵין שָׁם אִסּוּר יִחוּד בַּיוֹם וּבִתְחִלַּת הַלַּיְלָה, כָּל זְמַן שֶׁבְּנֵי אָדָם עוֹבְרִים וְשָׁבִים בָּרְחוֹב. וְאִם הָיָה זֶה רָגִיל בָּה, כְּגוֹן שֶגָּדְלָה עִמּוֹ, אוֹ שֶׁהִיא קְרוֹבָתוֹ, אוֹ שֶׁבַּעְלָּהּ הִזְהִיר אוֹתָה שֶלֹּא תִתְיַחֵד עִמּוֹ, הֲרֵי זוֹ לֹא תִתְיַחֵד עִמוֹ, אֲפִלּוּ בַּעְלָהּ בָּעִיר, וַאֲפִלּוּ בְּבַיִת שֶׁהַפֶּתַח פָּתוּחַ לִרְשׁוּת הָרַבִּים.
In a room where the door is open5Rashbah, Responsa 1,265 rules there is no yichud in such a case until the door is locked, however, Beis Meir and Rabbi Akiva Eiger Responsa 100 say that unless the door is opened, there is yichud; even if it is closed and not locked. to a public thoroughfare,6Chochmas Adam 112:7 questions if three dwellers in a yard is considered a thoroughfare or not. there is no prohibition of yichud during the daytime and in the early evening, so long as people are passing by on the street. But if he is an intimate friend of hers, like one with whom she grew up, or if she is related to him, or if her husband warned her not to be alone with him, she may not be alone with him, even if her husband is in town, and not even in a room whose door is opened to a public thoroughfare.
תנא דבי אליהו כל השונה הלכות בכל יום מובטח לו שהוא בן העולם הבא שנאמר הליכות עולם לו אל תקרי הליכות אלא הלכות (נדה ע"ג.)