Once it is permitted, it is permitted — Eruvin 70b
תלמוד בבלי מסכת עירובין דף ע/ב
זה הכלל כל שמותר למקצת שבת הותר לכל השבת
The Gemara here tells us that once something is permitted for a part of Shabbos, it remains permitted for all of Shabbos. This principle is cited as law (see Beur Halachah §371 d.h. Vehu and §374 d.h. V'Afilu).
Teshuvos Sha'ar Ephraim, Yoreh De'ah §67 (see also TeshuvosRav Pe'alim (vol. 2, Choshen Mishpat §4) applies this principle to other areas of Halachah. He first demonstrates that it can be found in other places in Shas. For example, in Yebamos 69a we find that a Kohen who betrothed a widow (erusin), who was appointed to be the Kohen Gadol before he could complete the marriage (nesuin), may follow through on the marriage — even though a Kohen Gadol is forbidden to marry a widow, and the reason there is clearly also because of the principle of "once it is permitted, it is permitted."
The Sha'ar Ephraim employs this principle in his ruling in that teshuva. The case was one in which a certain community accepted upon themselves a rabbi in perpetuity. After the rabbi had been in town for a month, amid great honor and respect, his son was married to an orphan of a good family. At that point, some members of the community started to demand the rabbi's ouster. It would seem that he had violated a cherem, enacted in the year 1655, that forbade the community from hiring any rabbi who was related to a member of the community — and now the rabbi was the father in law of one of the community's members!
The Sha'ar Ephraim rejected their complaint of the basis of our principle: Since at the time the rabbi took the position he had no relatives in the community and was therefore permitted to serve, "once it is permitted it remains permitted," and even after the rabbi became related to a person in the city, he could still retain his position.