I believe that this violates fire codes; not sure though.
It’s probably OK if there’s panic hardware on the doors (like a push bar across the entire width of the door, so if there is a crush of bodies against it the door opens, as opposed to a knob or thumb latch), and if the doors open outward.