Ruling is major blow to president’s immigration agenda