We're assuming, of course, you're asking this question from a legal standpoint, not a technical one.
From a technical standpoint, there are degrees of safety...
It should be safe, but trying telling that to, for example, the people who died in the United Airlines 747 accident.
It depends on how much faith you have in the electrics of the door locks and opening mechanisms.
Despite decades of evolution in aviation safety, engines still blow up, tyres still burst, autopilots still misbehave, people still take shortcuts...