Show categories to everyone except a specific group

Then you’ll make the g1 have access to the categories and g2 not have access.

You can control access to categories by group, so just put people in whatever group(s) is appropriate.