Court rules against immigrants with temporary status