In the military, we have the UCMJ that allows us to prosecute those military personnel that issue illegal orders. The President is the Commander-in-Chief, but he is a civilian, so the UCMJ doesn't apply. I always thought he would be charged under criminal law in that case, but it seems that this ruling precludes that.