Trump vowed to reverse the ban, but may run into legal trouble if he tries to do so without legislative action.