I’ve heard of people being allowed in a cockpit preflight, but apparently only crew members are allowed during an actual flight. The flight was chartered from United.
Federal officials are investigating a Rockies coach's cockpit visit during a United flight
Federal officials are investigating an unauthorized inflight cockpit visit by a coach for the Colorado Rockies baseball team during a United Airlines charter flight.
apnews.com