Re: Visits to flight deck by passengers.
Most flight deck crew would have little problem with any passenger who simply wanted to 'poke their nose' into the cockpit and have a quick look around. Crew can still perform shutdown or pre-flight checks with someone looking over their shoulder, no problem.
It's just annoying when spotters start asking daft questions like 'do planes have a reverse gear...?', etc., etc.
CAA rules forbid admittance to the flight deck by non-crew members during actual flight, however, there is no ruling that they cannot be admitted when the aircraft is on stand. It is at the discretion of the Captain, so this is a subjective issue.
FAA rules prohibit non-crew members on transatlantic flights (ie; spouses, friends, family etc.) from travelling in the jump seat. This has proved a great disappointment to the many individuals on staff travel who have not got on when the aircraft has gone full.