On which view is this? The What's New page?
The permission system in XenForo already does that so members can only ever see posts from forums which they have access to.
Can you provide a test log in and make a post in a restricted forum so I can check?