Shes about to be thrown into the brig.  Shes got the experience to know how to behave. And she has ignored a direct order.  When she is on the ship she is under the Captain's command.  Simple really. ;)