Here, this will tell you more than you should know about the cockpit door:
https://www.youtube.com/watch?v=ixEHV7c3VXs
After watching the video I wonder if it’s possible to accidentally put the door in secure lock by pushing the toggle too far.
Also what happens if someone in the passenger compartment enters the wrong code?