Is their any choice for the court to review 'detrimental'
Say a future president has a fear of clowns, Wickins, asians, atheist?    Not likely but you can't give a president unlimited right to discrinate either?

The SC has to ask why all citizens of these particular nations are suspect?  Is based on nationality, or religion?   In either case we aren't in a state of war with any of those nations.   

The court handled it well in making exceptions for close ties.

The Obama admin has been screening, which is where the court seems to be going by creating exceptions it is not a 'ban'