Eruvin, Chapter 10, Mishnah 10. This Mishnah discusses the law of the neger - the bolt with which doors were locked. The bolt was set into a hole in the ground behind the door, and in that way the door could not be opened.
The Mishnah's question:
When there is something on that bolt which makes it more than a mere bolt - not only an item whose function is to keep the door locked, but something that can serve as a utensil for other uses as well - what is the law regarding locking the door with it on Shabbos? Is inserting the bolt behind the door considered adding to a structure on Shabbos, or must it be permanently attached to the door in order to show that it is not adding to the structure? This is the Mishnah's question.
The words of the Mishnah: "Neger she'yesh b'rosho gelustra" - a bolt used for locking a door, and at its head, on its upper end, a gelustra is fixed. A gelustra is a round metal ball that can be used for grinding spices and the like, and therefore it has a potential use as a utensil.
"Rabbi Elazar oser" - it is forbidden to use such a bolt to lock the door on Shabbos. Although the Mishnah does not say so explicitly, its intent is that Rabbi Elazar forbids using it as a bolt unless it is tied to the door and suspended by a strong rope that will not break, so that it remains attached. In other words, in order to use it as a bolt one must do something that shows it is a permanent part of the door, and not something added on as part of the building's structure.
"Rabbi Yosei meikel" - Rabbi Yosei disagrees and permits fixing it as a bolt behind the door, even if it is tied only with a very weak string that would break immediately if the bolt were moved. The Gemara explains his reasoning: since the metal ball is fixed at its head, it has the status of a utensil, and therefore it does not appear as though one is adding to the structure.
Rabbi Elazar, on the other hand, holds that even though the metal ball is fixed to it, in order to show that it is not part of the structure it must be attached to the door in a strong and permanent manner.
The incident in the synagogue in Tiveria:
The Tannaim disagree about an incident that is brought as support for the halachic rulings of our Mishnah:
Rabbi Elazar: "Ma'aseh bi'chenesses she'b'Tiveria she'hayu nohagin b'hetter" - they were accustomed to be lenient in this matter and permitted using the bolt even though it was not tied, "ad she'ba Rabban Gamliel v'ha'zekeinim v'asru lahen" - until Rabban Gamliel and the Elders came and forbade it to them. Rabbi Elazar cites this in support of his own position, that it is forbidden unless the bolt is strongly attached to the door.
Rabbi Yosei: On the contrary, the incident was just the opposite: "Issur nahagu bah" - in that same synagogue in Tiveria they used to forbid the use of the bolt, "ba Rabban Gamliel v'ha'zekeinim v'hitiru lahen" - Rabban Gamliel and the Elders came and permitted it to them. Rabban Gamliel and the Elders ruled that they had erred in forbidding it, and that in truth it is permitted - in accordance with Rabbi Yosei's position at the beginning of the Mishnah.
In summary: In this Mishnah we learned the law of a bolt that has a gelustra at its head: according to Rabbi Elazar it may not be used to lock a door on Shabbos unless it is tied and suspended by a strong rope that demonstrates that it is a permanent part of the door, and according to Rabbi Yosei, since it has the status of a utensil, it is permitted even with a loose tie. We also examined their dispute over the interpretation of the incident in the synagogue in Tiveria: whether Rabban Gamliel and the Elders came to forbid what had been practiced leniently, or to permit what had been treated as forbidden.