The decision effectively allows border agents to shut the door to migrants fleeing violence and persecution.