I am a A320 Captain for a UK operator.
Whilst not wanting to discuss cockpit door procedures, I think it should be clear to those reading this thread that it requires a conscious person and a deliberate action of someone inside the flight deck to lock someone out and prevent entry to the flight deck.