I mean if there was no constitution then this phrase definitely would give the president that power:
>Whenever the President finds that the entry of any aliens or of any class of aliens into the United States would be detrimental to the interests of the United States, he may by proclamation, and for such period as he shall deem necessary, >suspend the entry of all aliens or any class of aliens as immigrants or nonimmigrants, or impose on the entry of aliens any restrictions he may deem to be appropriate.
It is ridiculously broad honestly... I don't know what congress was thinking delegating that much authority to the president. Perhaps, "detrimental to the interests of the United States" will be interpreted using rational scrutiny - i.e. if the order is not legally insane. So basically, they can provide any flimsy reason and the courts have to approve. Or perhaps the president could be given the power to establish a temporary emergency ban using a purely rational justification, 90 days or so, after which congressional approval would be required. That would give the president the power to deal with emergency situations quickly, while still preserving the right of congress to smack him down if he's overreaching.
The president doesn't need the authority to permanently ban any class of people for any reason. I just think this should have to go through congress first.
I think a modern court probably would rule against a straight up Muslim ban still, using constitutional reasoning, even though by the straight wording of the law it would be allowed. But the statute leaves the courts with little room if an EO is facially race neutral. You have to go back to the intentions, which is much more difficult to prove in a court of law. A really conservative justice like Thomas would probably still approve of a literal Muslim ban honestly, but it would be easier to sway Roberts and Kennedy in that case.