It's fine. If the people cannot get employed due to lower cost labor from another country, then it is a good reason to ban foreigners. A countries first duty is protecting and securing it's own people. South Sedan cannot do that, thus this is a good step.
Many other countries have thought about doing the same thing in recent years, including many Western nations.