The decision provides a legal boost for the administration's ambitious plans to expand its barriers along the U.S.-Mexico border.