A little bit of thread drift, but the company line (and I have asked fleet management) is that, although passengers are allowed to visit the flight deck when the aircraft is on the ground with the doors open ANY pictures of or from the flight deck are not allowed. Of course, I would always follow the company instructions on such matters. Anybody who says anything different on a public forum is nuts.
Needless to say, I don't think this is written down anywhere. The company turns a blind eye when it suits them but they will also use it as a big stick to beat people with when it suits them. They would say, "How do we know the aircraft is on the ground?"
This is the ME. You are guilty until you can prove you are innocent. Sometimes even after that.