No court ruling needed. A little document called the Constitution states that Presidents cannot grant amnesty, which is what Obama did (temporarily). DAPA was blocked by the courts and the SC voted 4-4, upholding the block. If DACA goes to the SC with a Conservative majority, it will be laid to rest with a 5-4 vote.