Quran 60:13 – To Not Make Friends With People Under Wrath Of Allah (i.e. Jews)
Yes, they were not allowed to make friends with them as the polytheists were going to be annihilated. However, with the people of the book, they could eat their food and marry their women, on the condition that they stop their opposition.