Are you referring to 'usergroups' or 'social groups' (Groups)?
If your are referring to 'usergroups' then you need to be a bit more exacting with your request. The '$post' variable will contain information regarding the poster, including his/her 'usergroups', '$vbulletin->userinfo' or $bbsuserinfo will contain the current user's information including usergroups. Obviously, if they have the same user-group 'in common they are both registered in the same usergroup. If not, then I guess you can say the 'usergroup' is private to them, but that could be quite a list.
Are you simply trying to show that they do not have access to special/key user-groups? If so, just check for specific instances.
In order for us to to help you, you will need to define the word 'private' as it refers to user-groups and/or permissions.
For simple user-group conditional in the templates just use.
Code:
<vb:if condition="is_member_of($post, xx)">
Some template html here
</vb:if>
Here is a couple of other references that you can use as examples:
https://vborg.vbsupport.ru/showthread.php?t=233661
https://vborg.vbsupport.ru/showthread.php?t=287513
If you Google vbulletin.org with your criteria you will find lots of interesting references.