Trump has that authority, as outlined by the law. If he's making that decision in order to attack constitutionally protected groups (like members of a certain religion or ethnicity, for instance), then he exceeds his authority by violating the constitution. That's the case at hand.

It's like when a business decides not to hire Muslims. Businesses have lots of authority in choosing their employees - religious tests exceed their authority, though.