I hear you knocking but you can't come in
I will be astonished if this story doe's not go viral. I know it can get a bit frosty up front but never so bad that a Captain locks out the 1st officer. There has to be more to this story than is presented. Doing this sort of thing is a career ending event without a bloody good excuse for all parties involved.