Yes, the sentence is grammatically correct. It suggests that the speaker believed (or had the impression) that the people they are addressing (likely friends or acquaintances) were okay with spending a lot of money on hair products or hair extensions for their girlfriends.
Possible rephrasing could include:
1. "I was under the impression that you all didn't mind spending a lot on hair products for your girlfriends."
2. "I thought you guys were