Landflap, you do realise we are talking about the aircraft being on the ground, with the engines shut down and the air-bridge attached don't you? The flight deck door will usually be open at that point anyway so any potential bad guys won't really need an invitation. Quite what they will do with a "hijacked" aircraft at the gate I'm not really sure.