The Supreme Court has given the Trump administration a green light to use a federal citizenship database to verify voters ahead of the midterm elections.