In many apartment buildings and hotels today, a power-operated door is used in the main entrance. A doorman stands by the entrance and presses a button or activates a sensor that electronically opens the door when a resident or guest arrives. The question naturally arises as to whether a Jew may enter such a building on Shabbat. Halacha forbids allowing a gentile to perform Melacha (an act forbidden on Shabbat) on one's behalf on Shabbat. Seemingly, then, it would be forbidden for a Jew to allow a doorman to press the button to open the door for him when he arrives at the building on Shabbat.
In truth, however, Rav Shemuel Pinhasi (contemporary scholar in Israel), in his work Ve'daber Davar (4:10), rules that one may allow a doorman to activate the electric door on Shabbat. Since the possibility exists of opening the door manually, by turning the handle, we do not consider the gentile as performing Melacha on behalf of the Jew. The doorman chooses to open the door electronically for his own convenience, and not because the Jew specifically wishes that the door be opened in this fashion. As such, the gentile acts in his own interest, rather than in the Jew's, and the Jew may therefore allow him to open the door electronically.
The Jew may not, however, explicitly request that the doorman open the door for him on Shabbat. He may make such a request only indirectly, such as by saying, "The door is locked" or "I would like to come inside."
Summary: One may allow a gentile doorman to open a power-operated door on his behalf on Shabbat. It is forbidden, however, to explicitly request that he open the door; one must express this request indirectly, such as by saying, "The door is locked."