If admitting the inhabitants of a certain country is perceived as constituting a danger to the host nation, does the host have the right to not allow them in?
If so, does the fact that most inhabitants of that country belong to one religion mean that it is the 'religion' that is being banned and not necesssarily the inhabitants of that country?
If that is the case then regardless of the danger posed by that country;  because all the inhabitants are of the same religion they must be allowed to enter the host nation for to bar them would amount to discrimination on religious grounds. 
Does this mean that only those countries who have a certain mix of religions among their inhabitants can be barred as immigrants?
Finally, if a majority of other countries composed of the same religious majority are not included in the ban, how can the ban be said to target that religion?
Don't dismiss this summarily.