In past decades, it was possible for passengers to visit the cockpit.
Another change post-9/11 was heightened cockpit security. In past decades, it was possible for passengers to visit the cockpit. After 2001, however, cockpit doors were made much stronger and advanced locking systems meant the pilot could control who enters and deny access in the case of an emergency.