The Justice Department settled a lawsuit brought by individuals who were blocked from entering the country after President Donald Trump’s first travel ban.