It only is if you think someone who has ever set foot on Iran is an ethnic Irani. You just have to look at this HN thread to see that is false, as this problem also applies to other embargoed countries.
We're both adults here and I assume we both can realize that splitting these hairs doesn't make my statement that banning everyone that's ever logged on Iran from slack is, in effect, a ban on Iranian ethnic users?
On the other, the author of the thread is accusing Slack of profiling him racially. What he's implying is that a human proceeded to stalk him around the Internet, on social networks, etc to check if he is an actual Iranian and ban him based on that. And that is a very, very grave accusation.
So no, a ban based on signing in from a specific locale has zero to do with ethnicity or race.